fixes #845 Simplify asciidoctor suffixes
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4483e43..80276c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -268,22 +268,22 @@
     macro (add_libnanomsg_man NAME SECT)
         add_custom_command (
             OUTPUT ${NAME}.${SECT}
-            COMMAND ${NN_A2M} -o ${NAME}.${SECT} ${NN_DOCDIR}/${NAME}.txt
-            MAIN_DEPENDENCY ${NN_DOCDIR}/${NAME}.txt
+            COMMAND ${NN_A2M} -o ${NAME}.${SECT} ${NN_DOCDIR}/${NAME}.adoc
+            MAIN_DEPENDENCY ${NN_DOCDIR}/${NAME}.adoc
         )
 
         add_custom_command (
-            OUTPUT ${NAME}.${SECT}.html
-            COMMAND ${NN_A2H} -o ${NAME}.${SECT}.html ${NN_DOCDIR}/${NAME}.txt
+            OUTPUT ${NAME}.html
+            COMMAND ${NN_A2H} -o ${NAME}.html ${NN_DOCDIR}/${NAME}.adoc
             DEPENDS ${NN_STYLESHEET}
-            MAIN_DEPENDENCY ${NN_DOCDIR}/${NAME}.txt
+            MAIN_DEPENDENCY ${NN_DOCDIR}/${NAME}.adoc
         )
 
         set(NN_MANS ${NN_MANS} ${NAME}.${SECT})
-        set(NN_HTMLS ${NN_HTMLS} ${NAME}.${SECT}.html)
+        set(NN_HTMLS ${NN_HTMLS} ${NAME}.html)
 
         install (
-            FILES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECT}.html
+            FILES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.html
             DESTINATION ${CMAKE_INSTALL_DOCDIR}
         )
         install (
diff --git a/doc/nanocat.txt b/doc/nanocat.adoc
similarity index 98%
rename from doc/nanocat.txt
rename to doc/nanocat.adoc
index 8154192..fd7b7df 100644
--- a/doc/nanocat.txt
+++ b/doc/nanocat.adoc
@@ -167,7 +167,7 @@
 
 SEE ALSO
 --------
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nanomsg.adoc b/doc/nanomsg.adoc
new file mode 100644
index 0000000..39796e4
--- /dev/null
+++ b/doc/nanomsg.adoc
@@ -0,0 +1,131 @@
+nanomsg(7)
+==========
+
+
+NAME
+----
+nanomsg - scalability protocols library
+
+
+SYNOPSIS
+--------
+*cc* ['flags'] 'files' *-lnanomsg* ['libraries']
+
+
+DESCRIPTION
+-----------
+
+Following functions are exported by nanomsg library:
+
+Create an SP socket::
+    <<nn_socket#,nn_socket(3)>>
+
+Close an SP socket::
+    <<nn_close#,nn_close(3)>>
+
+Set a socket option::
+    <<nn_setsockopt#,nn_setsockopt(3)>>
+
+Retrieve a socket option::
+    <<nn_getsockopt#,nn_getsockopt(3)>>
+
+Add a local endpoint to the socket::
+    <<nn_bind#,nn_bind(3)>>
+
+Add a remote endpoint to the socket::
+    <<nn_connect#,nn_connect(3)>>
+
+Remove an endpoint from the socket::
+    <<nn_shutdown#,nn_shutdown(3)>>
+
+Send a message::
+    <<nn_send#,nn_send(3)>>
+
+Receive a message::
+    <<nn_recv#,nn_recv(3)>>
+
+Fine-grained alternative to nn_send::
+    <<nn_sendmsg#,nn_sendmsg(3)>>
+
+Fine-grained alternative to nn_recv::
+    <<nn_recvmsg#,nn_recvmsg(3)>>
+
+Allocation of messages::
+    <<nn_allocmsg#,nn_allocmsg(3)>>
+    <<nn_reallocmsg#,nn_reallocmsg(3)>>
+    <<nn_freemsg#,nn_freemsg(3)>>
+
+Manipulation of message control data::
+    <<nn_cmsg#,nn_cmsg(3)>>
+
+Multiplexing::
+    <<nn_poll#,nn_poll(3)>>
+
+Retrieve the current errno::
+    <<nn_errno#,nn_errno(3)>>
+
+Convert an error number into human-readable string::
+    <<nn_strerror#,nn_strerror(3)>>
+
+Query the names and values of nanomsg symbols::
+    <<nn_symbol#,nn_symbol(3)>>
+
+Query properties of nanomsg symbols::
+    <<nn_symbol_info#,nn_symbol_info(3)>>
+
+Query statistics on a socket::
+    <<nn_get_statistic#,nn_get_statistic(3)>>
+
+Start a device::
+    <<nn_device#,nn_device(3)>>
+
+Notify all sockets about process termination::
+    <<nn_term#,nn_term(3)>>
+
+Environment variables that influence nanomsg work::
+    <<nn_env#,nn_env(7)>>
+
+Following scalability protocols are provided by nanomsg:
+
+One-to-one protocol::
+    <<nn_pair#,nn_pair(7)>>
+
+Request/reply protocol::
+    <<nn_reqrep#,nn_reqrep(7)>>
+
+Publish/subscribe protocol::
+    <<nn_pubsub#,nn_pubsub(7)>>
+
+Survey protocol::
+    <<nn_survey#,nn_survey(7)>>
+
+Pipeline protocol::
+    <<nn_pipeline#,nn_pipeline(7)>>
+
+Message bus protocol::
+    <<nn_bus#,nn_bus(7)>>
+
+Following transport mechanisms are provided by nanomsg:
+
+In-process transport::
+    <<nn_inproc#,nn_inproc(7)>>
+
+Inter-process transport::
+    <<nn_ipc#,nn_ipc(7)>>
+
+TCP transport::
+    <<nn_tcp#,nn_tcp(7)>>
+
+WebSocket transport::
+    <<nn_ws#,nn_ws(7)>>
+
+The following tool is installed with the library:
+
+nanocat::
+    <<nanocat#,nanocat(1)>>
+
+AUTHORS
+-------
+link:mailto:garrett@damore.org[Garrett D'Amore]
+link:mailto:sustrik@250bpm.com[Martin Sustrik]
+
diff --git a/doc/nanomsg.txt b/doc/nanomsg.txt
deleted file mode 100644
index 4a8fea4..0000000
--- a/doc/nanomsg.txt
+++ /dev/null
@@ -1,131 +0,0 @@
-nanomsg(7)
-==========
-
-
-NAME
-----
-nanomsg - scalability protocols library
-
-
-SYNOPSIS
---------
-*cc* ['flags'] 'files' *-lnanomsg* ['libraries']
-
-
-DESCRIPTION
------------
-
-Following functions are exported by nanomsg library:
-
-Create an SP socket::
-    <<nn_socket.3.txt#,nn_socket(3)>>
-
-Close an SP socket::
-    <<nn_close.3.txt#,nn_close(3)>>
-
-Set a socket option::
-    <<nn_setsockopt.3.txt#,nn_setsockopt(3)>>
-
-Retrieve a socket option::
-    <<nn_getsockopt.3.txt#,nn_getsockopt(3)>>
-
-Add a local endpoint to the socket::
-    <<nn_bind.3.txt#,nn_bind(3)>>
-
-Add a remote endpoint to the socket::
-    <<nn_connect.3.txt#,nn_connect(3)>>
-
-Remove an endpoint from the socket::
-    <<nn_shutdown.3.txt#,nn_shutdown(3)>>
-
-Send a message::
-    <<nn_send.3.txt#,nn_send(3)>>
-
-Receive a message::
-    <<nn_recv.3.txt#,nn_recv(3)>>
-
-Fine-grained alternative to nn_send::
-    <<nn_sendmsg.3.txt#,nn_sendmsg(3)>>
-
-Fine-grained alternative to nn_recv::
-    <<nn_recvmsg.3.txt#,nn_recvmsg(3)>>
-
-Allocation of messages::
-    <<nn_allocmsg.3.txt#,nn_allocmsg(3)>>
-    <<nn_reallocmsg.3.txt#,nn_reallocmsg(3)>>
-    <<nn_freemsg.3.txt#,nn_freemsg(3)>>
-
-Manipulation of message control data::
-    <<nn_cmsg.3.txt#,nn_cmsg(3)>>
-
-Multiplexing::
-    <<nn_poll.3.txt#,nn_poll(3)>>
-
-Retrieve the current errno::
-    <<nn_errno.3.txt#,nn_errno(3)>>
-
-Convert an error number into human-readable string::
-    <<nn_strerror.3.txt#,nn_strerror(3)>>
-
-Query the names and values of nanomsg symbols::
-    <<nn_symbol.3.txt#,nn_symbol(3)>>
-
-Query properties of nanomsg symbols::
-    <<nn_symbol_info.3.txt#,nn_symbol_info(3)>>
-
-Query statistics on a socket::
-    <<nn_get_statistic.3.txt#,nn_get_statistic(3)>>
-
-Start a device::
-    <<nn_device.3.txt#,nn_device(3)>>
-
-Notify all sockets about process termination::
-    <<nn_term.3.txt#,nn_term(3)>>
-
-Environment variables that influence nanomsg work::
-    <<nn_env.7.txt#,nn_env(7)>>
-
-Following scalability protocols are provided by nanomsg:
-
-One-to-one protocol::
-    <<nn_pair.7.txt#,nn_pair(7)>>
-
-Request/reply protocol::
-    <<nn_reqrep.7.txt#,nn_reqrep(7)>>
-
-Publish/subscribe protocol::
-    <<nn_pubsub.7.txt#,nn_pubsub(7)>>
-
-Survey protocol::
-    <<nn_survey.7.txt#,nn_survey(7)>>
-
-Pipeline protocol::
-    <<nn_pipeline.7.txt#,nn_pipeline(7)>>
-
-Message bus protocol::
-    <<nn_bus.7.txt#,nn_bus(7)>>
-
-Following transport mechanisms are provided by nanomsg:
-
-In-process transport::
-    <<nn_inproc.7.txt#,nn_inproc(7)>>
-
-Inter-process transport::
-    <<nn_ipc.7.txt#,nn_ipc(7)>>
-
-TCP transport::
-    <<nn_tcp.7.txt#,nn_tcp(7)>>
-
-WebSocket transport::
-    <<nn_ws.7.txt#,nn_ws(7)>>
-
-The following tool is installed with the library:
-
-nanocat::
-    <<nanocat.1.txt#,nanocat(1)>>
-
-AUTHORS
--------
-link:mailto:garrett@damore.org[Garrett D'Amore]
-link:mailto:sustrik@250bpm.com[Martin Sustrik]
-
diff --git a/doc/nn_allocmsg.txt b/doc/nn_allocmsg.adoc
similarity index 83%
rename from doc/nn_allocmsg.txt
rename to doc/nn_allocmsg.adoc
index 13b509a..d8aa3aa 100644
--- a/doc/nn_allocmsg.txt
+++ b/doc/nn_allocmsg.adoc
@@ -17,7 +17,7 @@
 -----------
 Allocate a message of the specified 'size' to be sent in zero-copy fashion.
 The content of the message is undefined after allocation and it should be filled
-in by the user. While <<nn_send.3.txt#,nn_send(3)>> and <<nn_sendmsg.3.txt#,nn_sendmsg(3)>> allow
+in by the user. While <<nn_send#,nn_send(3)>> and <<nn_sendmsg#,nn_sendmsg(3)>> allow
 to send arbitrary buffers, buffers allocated using _nn_allocmsg()_ can be more
 efficient for large messages as they allow for using zero-copy techniques.
 
@@ -56,11 +56,11 @@
 
 SEE ALSO
 --------
-<<nn_freemsg.3.txt#,nn_freemsg(3)>>
-<<nn_reallocmsg.3.txt#,nn_reallocmsg(3)>>
-<<nn_send.3.txt#,nn_send(3)>>
-<<nn_sendmsg.3.txt#,nn_sendmsg(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_freemsg#,nn_freemsg(3)>>
+<<nn_reallocmsg#,nn_reallocmsg(3)>>
+<<nn_send#,nn_send(3)>>
+<<nn_sendmsg#,nn_sendmsg(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_bind.txt b/doc/nn_bind.adoc
similarity index 82%
rename from doc/nn_bind.txt
rename to doc/nn_bind.adoc
index 619780f..11e4de1 100644
--- a/doc/nn_bind.txt
+++ b/doc/nn_bind.adoc
@@ -23,19 +23,19 @@
 of the 'address' part is specific to the underlying transport protocol.
 
 For the list of available transport protocols check the list on
-<<nanomsg.7.txt#,nanomsg(7)>> manual page.
+<<nanomsg#,nanomsg(7)>> manual page.
 
 Maximum length of the 'addr' parameter is specified by _NN_SOCKADDR_MAX_
 defined in '<nanomsg/nn.h>' header file.
 
-Note that nn_bind and <<nn_connect.3.txt#,nn_connect(3)>> may be called multiple times
+Note that nn_bind and <<nn_connect#,nn_connect(3)>> may be called multiple times
 on the same socket thus allowing the socket to communicate with multiple
 heterogeneous endpoints.
 
 RETURN VALUE
 ------------
 If the function succeeds positive endpoint ID is returned. Endpoint ID can be
-later used to remove the endpoint from the socket via <<nn_shutdown.3.txt#,nn_shutdown(3)>>
+later used to remove the endpoint from the socket via <<nn_shutdown#,nn_shutdown(3)>>
 function.
 
 If the function fails, then -1 is returned and 'errno' is set to to one of
@@ -76,13 +76,13 @@
 
 SEE ALSO
 --------
-<<nn_inproc.7.txt#,nn_inproc(7)>>
-<<nn_ipc.7.txt#,nn_ipc(7)>>
-<<nn_tcp.7.txt#,nn_tcp(7)>>
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_connect.3.txt#,nn_connect(3)>>
-<<nn_shutdown.3.txt#,nn_shutdown(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_inproc#,nn_inproc(7)>>
+<<nn_ipc#,nn_ipc(7)>>
+<<nn_tcp#,nn_tcp(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_connect#,nn_connect(3)>>
+<<nn_shutdown#,nn_shutdown(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_bus.txt b/doc/nn_bus.adoc
similarity index 83%
rename from doc/nn_bus.txt
rename to doc/nn_bus.adoc
index 0420fd4..2941ffc 100644
--- a/doc/nn_bus.txt
+++ b/doc/nn_bus.adoc
@@ -44,12 +44,12 @@
 
 SEE ALSO
 --------
-<<nn_pubsub.7.txt#,nn_pubsub(7)>>
-<<nn_reqrep.7.txt#,nn_reqrep(7)>>
-<<nn_pipeline.7.txt#,nn_pipeline(7)>>
-<<nn_survey.7.txt#,nn_survey(7)>>
-<<nn_pair.7.txt#,nn_pair(7)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_pubsub#,nn_pubsub(7)>>
+<<nn_reqrep#,nn_reqrep(7)>>
+<<nn_pipeline#,nn_pipeline(7)>>
+<<nn_survey#,nn_survey(7)>>
+<<nn_pair#,nn_pair(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_close.txt b/doc/nn_close.adoc
similarity index 90%
rename from doc/nn_close.txt
rename to doc/nn_close.adoc
index 63b83a5..9853249 100644
--- a/doc/nn_close.txt
+++ b/doc/nn_close.adoc
@@ -49,9 +49,9 @@
 
 SEE ALSO
 --------
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_setsockopt.3.txt#,nn_setsockopt(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_setsockopt#,nn_setsockopt(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_cmsg.txt b/doc/nn_cmsg.adoc
similarity index 87%
rename from doc/nn_cmsg.txt
rename to doc/nn_cmsg.adoc
index 7ae9825..61cf410 100644
--- a/doc/nn_cmsg.txt
+++ b/doc/nn_cmsg.adoc
@@ -32,7 +32,7 @@
     int cmsg_type;
 
 'cmsg_len' is the size of the property data, including the preceding nn_cmsghdr structure.
-'cmsg_level' is the level of the property; same values can be used as with <<nn_getsockopt.3.txt#,nn_getsockopt(3)>> and <<nn_setsockopt.3.txt#,nn_setsockopt(3)>>.
+'cmsg_level' is the level of the property; same values can be used as with <<nn_getsockopt#,nn_getsockopt(3)>> and <<nn_setsockopt#,nn_setsockopt(3)>>.
 'cmsg_type' is the name of the property. These names are specific for each level.
 
 _NN_CMSG_FIRSTHDR_ returns a pointer to the first nn_cmsghdr in the control buffer in the supplied nn_msghdr structure.
@@ -71,11 +71,11 @@
 
 SEE ALSO
 --------
-<<nn_sendmsg.3.txt#,nn_sendmsg(3)>>
-<<nn_recvmsg.3.txt#,nn_recvmsg(3)>>
-<<nn_getsockopt.3.txt#,nn_getsockopt(3)>>
-<<nn_setsockopt.3.txt#,nn_setsockopt(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_sendmsg#,nn_sendmsg(3)>>
+<<nn_recvmsg#,nn_recvmsg(3)>>
+<<nn_getsockopt#,nn_getsockopt(3)>>
+<<nn_setsockopt#,nn_setsockopt(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_connect.txt b/doc/nn_connect.adoc
similarity index 81%
rename from doc/nn_connect.txt
rename to doc/nn_connect.adoc
index a82ec69..908d939 100644
--- a/doc/nn_connect.txt
+++ b/doc/nn_connect.adoc
@@ -23,19 +23,19 @@
 of the 'address' part is specific to the underlying transport protocol.
 
 For the list of available transport protocols check the list on
-<<nanomsg.7.txt#,nanomsg(7)>> manual page.
+<<nanomsg#,nanomsg(7)>> manual page.
 
 Maximum length of the 'addr' parameter is specified by _NN_SOCKADDR_MAX_
 defined in '<nanomsg/nn.h>' header file.
 
-Note that nn_connect and <<nn_bind.3.txt#,nn_bind(3)>> may be called multiple times
+Note that nn_connect and <<nn_bind#,nn_bind(3)>> may be called multiple times
 on the same socket thus allowing the socket to communicate with multiple
 heterogeneous endpoints.
 
 RETURN VALUE
 ------------
 If the function succeeds positive endpoint ID is returned. Endpoint ID can be
-later used to remove the endpoint from the socket via <<nn_shutdown.3.txt#,nn_shutdown(3)>>
+later used to remove the endpoint from the socket via <<nn_shutdown#,nn_shutdown(3)>>
 function.
 
 If the function fails negative value is returned and 'errno' is set to to one of
@@ -72,13 +72,13 @@
 
 SEE ALSO
 --------
-<<nn_inproc.7.txt#,nn_inproc(7)>>
-<<nn_ipc.7.txt#,nn_ipc(7)>>
-<<nn_tcp.7.txt#,nn_tcp(7)>>
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_bind.3.txt#,nn_bind(3)>>
-<<nn_shutdown.3.txt#,nn_shutdown(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_inproc#,nn_inproc(7)>>
+<<nn_ipc#,nn_ipc(7)>>
+<<nn_tcp#,nn_tcp(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_bind#,nn_bind(3)>>
+<<nn_shutdown#,nn_shutdown(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_device.txt b/doc/nn_device.adoc
similarity index 90%
rename from doc/nn_device.txt
rename to doc/nn_device.adoc
index 8adb038..861c1e5 100644
--- a/doc/nn_device.txt
+++ b/doc/nn_device.adoc
@@ -22,7 +22,7 @@
 received from the socket back to itself.
 
 To break the loop and make _nn_device_ function exit use the
-<<nn_term.3.txt#,nn_term(3)>> function.
+<<nn_term#,nn_term(3)>> function.
 
 RETURN VALUE
 ------------
@@ -56,9 +56,9 @@
 
 SEE ALSO
 --------
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_term.3.txt#,nn_term(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_term#,nn_term(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_env.txt b/doc/nn_env.adoc
similarity index 96%
rename from doc/nn_env.txt
rename to doc/nn_env.adoc
index 3ccd095..d9a825f 100644
--- a/doc/nn_env.txt
+++ b/doc/nn_env.adoc
@@ -41,7 +41,7 @@
 
 SEE ALSO
 --------
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_errno.txt b/doc/nn_errno.adoc
similarity index 93%
rename from doc/nn_errno.txt
rename to doc/nn_errno.adoc
index b09ab89..547811c 100644
--- a/doc/nn_errno.txt
+++ b/doc/nn_errno.adoc
@@ -48,8 +48,8 @@
 
 SEE ALSO
 --------
-<<nn_strerror.3.txt#,nn_strerror(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_strerror#,nn_strerror(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_freemsg.txt b/doc/nn_freemsg.adoc
similarity index 60%
rename from doc/nn_freemsg.txt
rename to doc/nn_freemsg.adoc
index da8743f..8068816 100644
--- a/doc/nn_freemsg.txt
+++ b/doc/nn_freemsg.adoc
@@ -15,9 +15,9 @@
 
 DESCRIPTION
 -----------
-Deallocates a message allocated using <<nn_allocmsg.3.txt#,nn_allocmsg(3)>> function or
-received via <<nn_recv.3.txt#,nn_recv(3)>> or <<nn_recvmsg.3.txt#,nn_recvmsg(3)>> function.
-While <<nn_recv.3.txt#,nn_recv(3)>> and <<nn_recvmsg.3.txt#,nn_recvmsg(3)>> allow to receive data
+Deallocates a message allocated using <<nn_allocmsg#,nn_allocmsg(3)>> function or
+received via <<nn_recv#,nn_recv(3)>> or <<nn_recvmsg#,nn_recvmsg(3)>> function.
+While <<nn_recv#,nn_recv(3)>> and <<nn_recvmsg#,nn_recvmsg(3)>> allow to receive data
 into arbitrary buffers, using library-allocated buffers can be more
 efficient for large messages as it allows for using zero-copy techniques.
 
@@ -46,11 +46,11 @@
 
 SEE ALSO
 --------
-<<nn_allocmsg.3.txt#,nn_allocmsg(3)>>
-<<nn_reallocmsg.3.txt#,nn_reallocmsg(3)>>
-<<nn_recv.3.txt#,nn_recv(3)>>
-<<nn_recvmsg.3.txt#,nn_recvmsg(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_allocmsg#,nn_allocmsg(3)>>
+<<nn_reallocmsg#,nn_reallocmsg(3)>>
+<<nn_recv#,nn_recv(3)>>
+<<nn_recvmsg#,nn_recvmsg(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_get_statistic.txt b/doc/nn_get_statistic.adoc
similarity index 93%
rename from doc/nn_get_statistic.txt
rename to doc/nn_get_statistic.adoc
index 0d09842..89f038b 100644
--- a/doc/nn_get_statistic.txt
+++ b/doc/nn_get_statistic.adoc
@@ -27,7 +27,7 @@
 The following statistics are maintained by the nanomsg core framework;
 others may be present. As those are undocumented, no interpretration should
 be made from them. Not all statistics are relevant to all transports.
-For example, the <<nn_inproc.7.txt#,nn_inproc(7)>> transport does not
+For example, the <<nn_inproc#,nn_inproc(7)>> transport does not
 maintain any of the connection related statistics.
 
 
@@ -90,9 +90,9 @@
 
 SEE ALSO
 --------
-<<nn_errno.3.txt#,nn_errno(3)>>
-<<nn_symbol.3.txt#,nn_symbol(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_errno#,nn_errno(3)>>
+<<nn_symbol#,nn_symbol(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_getsockopt.txt b/doc/nn_getsockopt.adoc
similarity index 95%
rename from doc/nn_getsockopt.txt
rename to doc/nn_getsockopt.adoc
index 7d5810f..0a20a02 100644
--- a/doc/nn_getsockopt.txt
+++ b/doc/nn_getsockopt.adoc
@@ -111,11 +111,11 @@
 *NN_SOCKET_NAME*::
     Socket name for error reporting and statistics. The type of the option
     is string. Default value is "N" where N is socket integer.
-    *This option is experimental, see <<nn_env.7.txt#,nn_env(7)>> for details*
+    *This option is experimental, see <<nn_env#,nn_env(7)>> for details*
 *NN_TTL*::
     Retrieves the maximum number of "hops" a message can go through before
     it is dropped.  Each time the message is received (for example via
-    the <<nn_device.3.txt#,nn_device(3)>> function) counts as a single hop.
+    the <<nn_device#,nn_device(3)>> function) counts as a single hop.
     This provides a form of protection against inadvertent loops.
 
 
@@ -146,9 +146,9 @@
 
 SEE ALSO
 --------
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_setsockopt.3.txt#,nn_setsockopt(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_setsockopt#,nn_setsockopt(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_inproc.txt b/doc/nn_inproc.adoc
similarity index 90%
rename from doc/nn_inproc.txt
rename to doc/nn_inproc.adoc
index 7b65bf4..a48b2aa 100644
--- a/doc/nn_inproc.txt
+++ b/doc/nn_inproc.adoc
@@ -44,11 +44,11 @@
 
 SEE ALSO
 --------
-<<nn_ipc.7.txt#,nn_ipc(7)>>
-<<nn_tcp.7.txt#,nn_tcp(7)>>
-<<nn_bind.3.txt#,nn_bind(3)>>
-<<nn_connect.3.txt#,nn_connect(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_ipc#,nn_ipc(7)>>
+<<nn_tcp#,nn_tcp(7)>>
+<<nn_bind#,nn_bind(3)>>
+<<nn_connect#,nn_connect(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_ipc.txt b/doc/nn_ipc.adoc
similarity index 87%
rename from doc/nn_ipc.txt
rename to doc/nn_ipc.adoc
index 410dcab..486367b 100644
--- a/doc/nn_ipc.txt
+++ b/doc/nn_ipc.adoc
@@ -39,11 +39,11 @@
 
 SEE ALSO
 --------
-<<nn_inproc.7.txt#,nn_inproc(7)>>
-<<nn_tcp.7.txt#,nn_tcp(7)>>
-<<nn_bind.3.txt#,nn_bind(3)>>
-<<nn_connect.3.txt#,nn_connect(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_inproc#,nn_inproc(7)>>
+<<nn_tcp#,nn_tcp(7)>>
+<<nn_bind#,nn_bind(3)>>
+<<nn_connect#,nn_connect(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_pair.txt b/doc/nn_pair.adoc
similarity index 82%
rename from doc/nn_pair.txt
rename to doc/nn_pair.adoc
index e825992..d8a7fb5 100644
--- a/doc/nn_pair.txt
+++ b/doc/nn_pair.adoc
@@ -34,7 +34,7 @@
 NN_PAIR::
     Socket for communication with exactly one peer. Each party can send messages
     at any time. If the peer is not available or send buffer is full subsequent
-    calls to <<nn_send.3.txt#,nn_send(3)>> will block until it's possible to send the
+    calls to <<nn_send#,nn_send(3)>> will block until it's possible to send the
     message.
 
 Socket Options
@@ -44,12 +44,12 @@
 
 SEE ALSO
 --------
-<<nn_bus.7.txt#,nn_bus(7)>>
-<<nn_pubsub.7.txt#,nn_pubsub(7)>>
-<<nn_reqrep.7.txt#,nn_reqrep(7)>>
-<<nn_pipeline.7.txt#,nn_pipeline(7)>>
-<<nn_survey.7.txt#,nn_survey(7)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_bus#,nn_bus(7)>>
+<<nn_pubsub#,nn_pubsub(7)>>
+<<nn_reqrep#,nn_reqrep(7)>>
+<<nn_pipeline#,nn_pipeline(7)>>
+<<nn_survey#,nn_survey(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_pipeline.txt b/doc/nn_pipeline.adoc
similarity index 81%
rename from doc/nn_pipeline.txt
rename to doc/nn_pipeline.adoc
index 465eef2..bc4295b 100644
--- a/doc/nn_pipeline.txt
+++ b/doc/nn_pipeline.adoc
@@ -35,12 +35,12 @@
 
 SEE ALSO
 --------
-<<nn_bus.7.txt#,nn_bus(7)>>
-<<nn_pubsub.7.txt#,nn_pubsub(7)>>
-<<nn_reqrep.7.txt#,nn_reqrep(7)>>
-<<nn_survey.7.txt#,nn_survey(7)>>
-<<nn_pair.7.txt#,nn_pair(7)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_bus#,nn_bus(7)>>
+<<nn_pubsub#,nn_pubsub(7)>>
+<<nn_reqrep#,nn_reqrep(7)>>
+<<nn_survey#,nn_survey(7)>>
+<<nn_pair#,nn_pair(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_poll.txt b/doc/nn_poll.adoc
similarity index 95%
rename from doc/nn_poll.txt
rename to doc/nn_poll.adoc
index 8b7542d..ad1f3e2 100644
--- a/doc/nn_poll.txt
+++ b/doc/nn_poll.adoc
@@ -100,9 +100,9 @@
 
 SEE ALSO
 --------
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_getsockopt.3.txt#,nn_getsockopt(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_getsockopt#,nn_getsockopt(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_pubsub.txt b/doc/nn_pubsub.adoc
similarity index 92%
rename from doc/nn_pubsub.txt
rename to doc/nn_pubsub.adoc
index 5503692..8f57266 100644
--- a/doc/nn_pubsub.txt
+++ b/doc/nn_pubsub.adoc
@@ -90,12 +90,12 @@
 
 SEE ALSO
 --------
-<<nn_bus.7.txt#,nn_bus(7)>>
-<<nn_reqrep.7.txt#,nn_reqrep(7)>>
-<<nn_pipeline.7.txt#,nn_pipeline(7)>>
-<<nn_survey.7.txt#,nn_survey(7)>>
-<<nn_pair.7.txt#,nn_pair(7)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_bus#,nn_bus(7)>>
+<<nn_reqrep#,nn_reqrep(7)>>
+<<nn_pipeline#,nn_pipeline(7)>>
+<<nn_survey#,nn_survey(7)>>
+<<nn_pair#,nn_pair(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_reallocmsg.txt b/doc/nn_reallocmsg.adoc
similarity index 80%
rename from doc/nn_reallocmsg.txt
rename to doc/nn_reallocmsg.adoc
index eb82d92..c23c03e 100644
--- a/doc/nn_reallocmsg.txt
+++ b/doc/nn_reallocmsg.adoc
@@ -14,7 +14,7 @@
 
 DESCRIPTION
 -----------
-Reallocate a message previously allocated by <<nn_allocmsg.3.txt#,nn_allocmsg(3)>> or
+Reallocate a message previously allocated by <<nn_allocmsg#,nn_allocmsg(3)>> or
 received from a peer using NN_MSG mechanism.
 
 Note that as with the standard _realloc_, the operation may involve copying
@@ -46,9 +46,9 @@
 
 SEE ALSO
 --------
-<<nn_allocmsg.3.txt#,nn_allocmsg(3)>>
-<<nn_freemsg.3.txt#,nn_freemsg(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_allocmsg#,nn_allocmsg(3)>>
+<<nn_freemsg#,nn_freemsg(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_recv.txt b/doc/nn_recv.adoc
similarity index 90%
rename from doc/nn_recv.txt
rename to doc/nn_recv.adoc
index 1b9272a..f4e3b3e 100644
--- a/doc/nn_recv.txt
+++ b/doc/nn_recv.adoc
@@ -23,7 +23,7 @@
 let the 'buf' parameter be a pointer to a void* variable (pointer to pointer)
 to the receive buffer and set the 'len' parameter to _NN_MSG_. If the call is
 successful the user is responsible for deallocating the message using
-the <<nn_freemsg.3.txt#,nn_freemsg(3)>> function.
+the <<nn_freemsg#,nn_freemsg(3)>> function.
 
 The 'flags' argument is a combination of the flags defined below:
 
@@ -79,7 +79,7 @@
 The following will get a message from the pipe with a buffer allocated by
 the system. It is large enough to accommodate the entire message. This is a good
 way to get the entire message without truncating if the size of the message is
-unknown. It is the user's responsibility to call <<nn_freemsg.3.txt#,nn_freemsg(3)>> after
+unknown. It is the user's responsibility to call <<nn_freemsg#,nn_freemsg(3)>> after
 processing the message.
 
 ----
@@ -102,10 +102,10 @@
 
 SEE ALSO
 --------
-<<nn_send.3.txt#,nn_send(3)>>
-<<nn_recvmsg.3.txt#,nn_recvmsg(3)>>
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_send#,nn_send(3)>>
+<<nn_recvmsg#,nn_recvmsg(3)>>
+<<nn_socket#,nn_socket(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_recvmsg.txt b/doc/nn_recvmsg.adoc
similarity index 89%
rename from doc/nn_recvmsg.txt
rename to doc/nn_recvmsg.adoc
index b658a4b..4ab5309 100644
--- a/doc/nn_recvmsg.txt
+++ b/doc/nn_recvmsg.adoc
@@ -33,7 +33,7 @@
 the received message. 'msg_controllen' specifies the length of the buffer.
 If the control information should not be retrieved, set 'msg_control' parameter
 to NULL. For detailed discussion of how to parse the control information check
-<<nn_cmsg.3.txt#,nn_cmsg(3)>> man page.
+<<nn_cmsg#,nn_cmsg(3)>> man page.
 
 Structure 'nn_iovec' defines one element in the gather array (a buffer to be
 filled in by message data) and contains following members:
@@ -44,7 +44,7 @@
 Alternatively, _nanomsg_ library can allocate the buffer for you. To do so,
 let the 'iov_base' point to void* variable to receive the buffer and set
 'iov_len' to _NN_MSG_. After successful completion user is responsible
-for deallocating the message using <<nn_freemsg.3.txt#,nn_freemsg(3)>> function. Gather
+for deallocating the message using <<nn_freemsg#,nn_freemsg(3)>> function. Gather
 array in _nn_msghdr_ structure can contain only one element in this case.
 
 The 'flags' argument is a combination of the flags defined below:
@@ -104,12 +104,12 @@
 
 SEE ALSO
 --------
-<<nn_recv.3.txt#,nn_recv(3)>>
-<<nn_sendmsg.3.txt#,nn_sendmsg(3)>>
-<<nn_allocmsg.3.txt#,nn_allocmsg(3)>>
-<<nn_freemsg.3.txt#,nn_freemsg(3)>>
-<<nn_cmsg.3.txt#,nn_cmsg(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_recv#,nn_recv(3)>>
+<<nn_sendmsg#,nn_sendmsg(3)>>
+<<nn_allocmsg#,nn_allocmsg(3)>>
+<<nn_freemsg#,nn_freemsg(3)>>
+<<nn_cmsg#,nn_cmsg(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_reqrep.txt b/doc/nn_reqrep.adoc
similarity index 89%
rename from doc/nn_reqrep.txt
rename to doc/nn_reqrep.adoc
index 4624824..f3a4544 100644
--- a/doc/nn_reqrep.txt
+++ b/doc/nn_reqrep.adoc
@@ -56,12 +56,12 @@
 
 SEE ALSO
 --------
-<<nn_bus.7.txt#,nn_bus(7)>>
-<<nn_pubsub.7.txt#,nn_pubsub(7)>>
-<<nn_pipeline.7.txt#,nn_pipeline(7)>>
-<<nn_survey.7.txt#,nn_survey(7)>>
-<<nn_pair.7.txt#,nn_pair(7)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_bus#,nn_bus(7)>>
+<<nn_pubsub#,nn_pubsub(7)>>
+<<nn_pipeline#,nn_pipeline(7)>>
+<<nn_survey#,nn_survey(7)>>
+<<nn_pair#,nn_pair(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_send.txt b/doc/nn_send.adoc
similarity index 90%
rename from doc/nn_send.txt
rename to doc/nn_send.adoc
index bc00052..6aa4a04 100644
--- a/doc/nn_send.txt
+++ b/doc/nn_send.adoc
@@ -17,7 +17,7 @@
 The function will send a message containing the data from buffer pointed to
 by 'buf' parameter to the socket 's'. The message will be 'len' bytes long.
 
-Alternatively, to send a buffer allocated by <<nn_allocmsg.3.txt#,nn_allocmsg(3)>> function
+Alternatively, to send a buffer allocated by <<nn_allocmsg#,nn_allocmsg(3)>> function
 set the buf parameter to point to the pointer to the buffer and 'len' parameter
 to _NN_MSG_ constant. In this case a successful call to _nn_send_ will
 deallocate the buffer. Trying to deallocate it afterwards will result in
@@ -87,10 +87,10 @@
 
 SEE ALSO
 --------
-<<nn_recv.3.txt#,nn_recv(3)>>
-<<nn_sendmsg.3.txt#,nn_sendmsg(3)>>
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_recv#,nn_recv(3)>>
+<<nn_sendmsg#,nn_sendmsg(3)>>
+<<nn_socket#,nn_socket(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_sendmsg.txt b/doc/nn_sendmsg.adoc
similarity index 91%
rename from doc/nn_sendmsg.txt
rename to doc/nn_sendmsg.adoc
index c15dcd4..ac025ea 100644
--- a/doc/nn_sendmsg.txt
+++ b/doc/nn_sendmsg.adoc
@@ -33,7 +33,7 @@
 associated with the message being sent. 'msg_controllen' specifies the length
 of the buffer. If there's no control information to send, 'msg_control' should
 be set to NULL. For detailed discussion of how to set control data check
-<<nn_cmsg.3.txt#,nn_cmsg(3)>> man page.
+<<nn_cmsg#,nn_cmsg(3)>> man page.
 
 Structure 'nn_iovec' defines one element in the scatter array (i.e. a buffer
 to send to the socket) and contains following members:
@@ -41,7 +41,7 @@
     void *iov_base;
     size_t iov_len;
 
-Alternatively, to send a buffer allocated by <<nn_allocmsg.3.txt#,nn_allocmsg(3)>> function
+Alternatively, to send a buffer allocated by <<nn_allocmsg#,nn_allocmsg(3)>> function
 set 'iov_base' to point to the pointer to the buffer and 'iov_len' to _NN_MSG_
 constant. In this case a successful call to _nn_sendmsg_ will deallocate the
 buffer. Trying to deallocate it afterwards will result in undefined behaviour.
@@ -137,12 +137,12 @@
 
 SEE ALSO
 --------
-<<nn_send.3.txt#,nn_send(3)>>
-<<nn_recvmsg.3.txt#,nn_recvmsg(3)>>
-<<nn_allocmsg.3.txt#,nn_allocmsg(3)>>
-<<nn_freemsg.3.txt#,nn_freemsg(3)>>
-<<nn_cmsg.3.txt#,nn_cmsg(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_send#,nn_send(3)>>
+<<nn_recvmsg#,nn_recvmsg(3)>>
+<<nn_allocmsg#,nn_allocmsg(3)>>
+<<nn_freemsg#,nn_freemsg(3)>>
+<<nn_cmsg#,nn_cmsg(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_setsockopt.txt b/doc/nn_setsockopt.adoc
similarity index 92%
rename from doc/nn_setsockopt.txt
rename to doc/nn_setsockopt.adoc
index cc2d912..5deb41e 100644
--- a/doc/nn_setsockopt.txt
+++ b/doc/nn_setsockopt.adoc
@@ -84,18 +84,18 @@
 *NN_SOCKET_NAME*::
     Socket name for error reporting and statistics. The type of the option
     is string. Default value is "socket.N" where N is socket integer.
-    *This option is experimental, see <<nn_env.7.txt#,nn_env(7)>> for details*
+    *This option is experimental, see <<nn_env#,nn_env(7)>> for details*
 *NN_TTL*::
     Sets the maximum number of "hops" a message can go through before
     it is dropped.  Each time the message is received (for example via
-    the <<nn_device.3.txt#,nn_device(3)>> function) counts as a single hop.
+    the <<nn_device#,nn_device(3)>> function) counts as a single hop.
     This provides a form of protection against inadvertent loops.
 *NN_LINGER*::
     This option is not implemented, and should not be used in new code.
     Applications which need to be sure that their messages are delivered
     to a remote peer should either use an acknowledgement (implied when
-    receiving a reply on <<nn_reqrep.7.txt#,NN_REQ>> sockets), or insert
-    a suitable delay before calling <<nn_close.3.txt#,nn_close(3)>> or
+    receiving a reply on <<nn_reqrep#,NN_REQ>> sockets), or insert
+    a suitable delay before calling <<nn_close#,nn_close(3)>> or
     exiting the application.
 
 
@@ -129,9 +129,9 @@
 
 SEE ALSO
 --------
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_getsockopt.3.txt#,nn_getsockopt(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_getsockopt#,nn_getsockopt(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_shutdown.txt b/doc/nn_shutdown.adoc
similarity index 78%
rename from doc/nn_shutdown.txt
rename to doc/nn_shutdown.adoc
index 77cb0dd..f93fbff 100644
--- a/doc/nn_shutdown.txt
+++ b/doc/nn_shutdown.adoc
@@ -16,8 +16,8 @@
 DESCRIPTION
 -----------
 Removes an endpoint from socket 's'. 'how' parameter specifies the ID of the
-endpoint to remove as returned by prior call to <<nn_bind.3.txt#,nn_bind(3)>> or
-<<nn_connect.3.txt#,nn_connect(3)>>. _nn_shutdown()_ call will return immediately,
+endpoint to remove as returned by prior call to <<nn_bind#,nn_bind(3)>> or
+<<nn_connect#,nn_connect(3)>>. _nn_shutdown()_ call will return immediately,
 however, the library will try to deliver any outstanding outbound messages to
 the endpoint for the time specified by _NN_LINGER_ socket option.
 
@@ -53,10 +53,10 @@
 
 SEE ALSO
 --------
-<<nn_socket.3.txt#,nn_socket(3)>>
-<<nn_bind.3.txt#,nn_bind(3)>>
-<<nn_connect.3.txt#,nn_connect(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_socket#,nn_socket(3)>>
+<<nn_bind#,nn_bind(3)>>
+<<nn_connect#,nn_connect(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_socket.txt b/doc/nn_socket.adoc
similarity index 83%
rename from doc/nn_socket.txt
rename to doc/nn_socket.adoc
index 060100f..8daa6b9 100644
--- a/doc/nn_socket.txt
+++ b/doc/nn_socket.adoc
@@ -33,7 +33,7 @@
 
 The newly created socket is initially not associated with any endpoints.
 In order to establish a message flow at least one endpoint has to be added
-to the socket using <<nn_bind.3.txt#,nn_bind(3)>> or <<nn_connect.3.txt#,nn_connect(3)>>
+to the socket using <<nn_bind#,nn_bind(3)>> or <<nn_connect#,nn_connect(3)>>
 function.
 
 Also note that 'type' argument as found in standard _socket(2)_ function is
@@ -76,15 +76,15 @@
 
 SEE ALSO
 --------
-<<nn_pubsub.7.txt#,nn_pubsub(7)>>
-<<nn_reqrep.7.txt#,nn_reqrep(7)>>
-<<nn_pipeline.7.txt#,nn_pipeline(7)>>
-<<nn_survey.7.txt#,nn_survey(7)>>
-<<nn_bus.7.txt#,nn_bus(7)>>
-<<nn_bind.3.txt#,nn_bind(3)>>
-<<nn_connect.3.txt#,nn_connect(3)>>
-<<nn_close.3.txt#,nn_close(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_pubsub#,nn_pubsub(7)>>
+<<nn_reqrep#,nn_reqrep(7)>>
+<<nn_pipeline#,nn_pipeline(7)>>
+<<nn_survey#,nn_survey(7)>>
+<<nn_bus#,nn_bus(7)>>
+<<nn_bind#,nn_bind(3)>>
+<<nn_connect#,nn_connect(3)>>
+<<nn_close#,nn_close(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 AUTHORS
 -------
diff --git a/doc/nn_strerror.txt b/doc/nn_strerror.adoc
similarity index 87%
rename from doc/nn_strerror.txt
rename to doc/nn_strerror.adoc
index 4e3fe76..2c38e72 100644
--- a/doc/nn_strerror.txt
+++ b/doc/nn_strerror.adoc
@@ -41,9 +41,9 @@
 
 SEE ALSO
 --------
-<<nn_errno.3.txt#,nn_errno(3)>>
-<<nn_symbol.3.txt#,nn_symbol(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_errno#,nn_errno(3)>>
+<<nn_symbol#,nn_symbol(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_survey.txt b/doc/nn_survey.adoc
similarity index 85%
rename from doc/nn_survey.txt
rename to doc/nn_survey.adoc
index 9c1e97d..b12cad8 100644
--- a/doc/nn_survey.txt
+++ b/doc/nn_survey.adoc
@@ -43,12 +43,12 @@
 
 SEE ALSO
 --------
-<<nn_bus.7.txt#,nn_bus(7)>>
-<<nn_pubsub.7.txt#,nn_pubsub(7)>>
-<<nn_reqrep.7.txt#,nn_reqrep(7)>>
-<<nn_pipeline.7.txt#,nn_pipeline(7)>>
-<<nn_pair.7.txt#,nn_pair(7)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_bus#,nn_bus(7)>>
+<<nn_pubsub#,nn_pubsub(7)>>
+<<nn_reqrep#,nn_reqrep(7)>>
+<<nn_pipeline#,nn_pipeline(7)>>
+<<nn_pair#,nn_pair(7)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_symbol.txt b/doc/nn_symbol.adoc
similarity index 92%
rename from doc/nn_symbol.txt
rename to doc/nn_symbol.adoc
index b9b572b..4099aaf 100644
--- a/doc/nn_symbol.txt
+++ b/doc/nn_symbol.adoc
@@ -63,10 +63,10 @@
 
 SEE ALSO
 --------
-<<nn_symbol_info.3.txt#,nn_symbol_info(3)>>
-<<nn_errno.3.txt#,nn_errno(3)>>
-<<nn_strerror.3.txt#,nn_strerror(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_symbol_info#,nn_symbol_info(3)>>
+<<nn_errno#,nn_errno(3)>>
+<<nn_strerror#,nn_strerror(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_symbol_info.txt b/doc/nn_symbol_info.adoc
similarity index 96%
rename from doc/nn_symbol_info.txt
rename to doc/nn_symbol_info.adoc
index caaf9c4..54e01f1 100644
--- a/doc/nn_symbol_info.txt
+++ b/doc/nn_symbol_info.adoc
@@ -143,10 +143,10 @@
 
 SEE ALSO
 --------
-<<nn_symbol.3.txt#,nn_symbol(3)>>
-<<nn_errno.3.txt#,nn_errno(3)>>
-<<nn_strerror.3.txt#,nn_strerror(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_symbol#,nn_symbol(3)>>
+<<nn_errno#,nn_errno(3)>>
+<<nn_strerror#,nn_strerror(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_tcp.txt b/doc/nn_tcp.adoc
similarity index 92%
rename from doc/nn_tcp.txt
rename to doc/nn_tcp.adoc
index ec308bd..f5bd024 100644
--- a/doc/nn_tcp.txt
+++ b/doc/nn_tcp.adoc
@@ -64,11 +64,11 @@
 
 SEE ALSO
 --------
-<<nn_inproc.7.txt#,nn_inproc(7)>>
-<<nn_ipc.7.txt#,nn_ipc(7)>>
-<<nn_bind.3.txt#,nn_bind(3)>>
-<<nn_connect.3.txt#,nn_connect(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_inproc#,nn_inproc(7)>>
+<<nn_ipc#,nn_ipc(7)>>
+<<nn_bind#,nn_bind(3)>>
+<<nn_connect#,nn_connect(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_term.txt b/doc/nn_term.adoc
similarity index 74%
rename from doc/nn_term.txt
rename to doc/nn_term.adoc
index 5803acb..c8f2da7 100644
--- a/doc/nn_term.txt
+++ b/doc/nn_term.adoc
@@ -20,9 +20,9 @@
 termination is underway.
 
 If a socket is blocked inside a blocking function, such as
-<<nn_recv.3.txt#,nn_recv(3)>>, it will be unblocked  and ETERM error will be returned
+<<nn_recv#,nn_recv(3)>>, it will be unblocked  and ETERM error will be returned
 to the user. Similarly, any subsequent attempt to invoke a socket function other
-than <<nn_close.3.txt#,nn_close(3)>> after _nn_term()_ was called will result
+than <<nn_close#,nn_close(3)>> after _nn_term()_ was called will result
 in ETERM error.
 
 If waiting for _NN_SNDFD_ or _NN_RCVFD_ using a polling function, such as
@@ -45,11 +45,11 @@
 
 SEE ALSO
 --------
-<<nn_close.3.txt#,nn_close(3)>>
-<<nn_send.3.txt#,nn_send(3)>>
-<<nn_recv.3.txt#,nn_recv(3)>>
-<<nn_getsockopt.3.txt#,nn_getsockopt(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_close#,nn_close(3)>>
+<<nn_send#,nn_send(3)>>
+<<nn_recv#,nn_recv(3)>>
+<<nn_getsockopt#,nn_getsockopt(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS
diff --git a/doc/nn_ws.txt b/doc/nn_ws.adoc
similarity index 93%
rename from doc/nn_ws.txt
rename to doc/nn_ws.adoc
index 102b463..0e96c42 100644
--- a/doc/nn_ws.txt
+++ b/doc/nn_ws.adoc
@@ -87,12 +87,12 @@
 
 SEE ALSO
 --------
-<<nn_tcp.7.txt#,nn_tcp(7)>>
-<<nn_inproc.7.txt#,nn_inproc(7)>>
-<<nn_ipc.7.txt#,nn_ipc(7)>>
-<<nn_bind.3.txt#,nn_bind(3)>>
-<<nn_connect.3.txt#,nn_connect(3)>>
-<<nanomsg.7.txt#,nanomsg(7)>>
+<<nn_tcp#,nn_tcp(7)>>
+<<nn_inproc#,nn_inproc(7)>>
+<<nn_ipc#,nn_ipc(7)>>
+<<nn_bind#,nn_bind(3)>>
+<<nn_connect#,nn_connect(3)>>
+<<nanomsg#,nanomsg(7)>>
 
 
 AUTHORS