manpage.xml.ex 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!--
  5. `xsltproc -''-nonet \
  6. -''-param man.charmap.use.subset "0" \
  7. -''-param make.year.ranges "1" \
  8. -''-param make.single.year.ranges "1" \
  9. /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  10. manpage.xml'
  11. A manual page <package>.<section> will be generated. You may view the
  12. manual page with: nroff -man <package>.<section> | less'. A typical entry
  13. in a Makefile or Makefile.am is:
  14. DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl
  15. XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
  16. manpage.1: manpage.xml
  17. $(XP) $(DB2MAN) $<
  18. The xsltproc binary is found in the xsltproc package. The XSL files are in
  19. docbook-xsl. A description of the parameters you can use can be found in the
  20. docbook-xsl-doc-* packages. Please remember that if you create the nroff
  21. version in one of the debian/rules file targets (such as build), you will need
  22. to include xsltproc and docbook-xsl in your Build-Depends control field.
  23. Alternatively use the xmlto command/package. That will also automatically
  24. pull in xsltproc and docbook-xsl.
  25. Notes for using docbook2x: docbook2x-man does not automatically create the
  26. AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as
  27. <refsect1> ... </refsect1>.
  28. To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections
  29. read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be
  30. found in the docbook-xsl-doc-html package.
  31. Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`
  32. General documentation about man-pages and man-page-formatting:
  33. man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
  34. -->
  35. <!-- Fill in your name for FIRSTNAME and SURNAME. -->
  36. <!ENTITY dhfirstname "FIRSTNAME">
  37. <!ENTITY dhsurname "SURNAME">
  38. <!-- dhusername could also be set to "&dhfirstname; &dhsurname;". -->
  39. <!ENTITY dhusername "Praveen Arimbrathodiyil">
  40. <!ENTITY dhemail "praveen@debian.org">
  41. <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
  42. allowed: see man(7), man(1) and
  43. http://www.tldp.org/HOWTO/Man-Page/q2.html. -->
  44. <!ENTITY dhsection "SECTION">
  45. <!-- TITLE should be something like "User commands" or similar (see
  46. http://www.tldp.org/HOWTO/Man-Page/q2.html). -->
  47. <!ENTITY dhtitle "http-parser User Manual">
  48. <!ENTITY dhucpackage "HTTP-PARSER">
  49. <!ENTITY dhpackage "http-parser">
  50. ]>
  51. <refentry>
  52. <refentryinfo>
  53. <title>&dhtitle;</title>
  54. <productname>&dhpackage;</productname>
  55. <authorgroup>
  56. <author>
  57. <firstname>&dhfirstname;</firstname>
  58. <surname>&dhsurname;</surname>
  59. <contrib>Wrote this manpage for the Debian system.</contrib>
  60. <address>
  61. <email>&dhemail;</email>
  62. </address>
  63. </author>
  64. </authorgroup>
  65. <copyright>
  66. <year>2007</year>
  67. <holder>&dhusername;</holder>
  68. </copyright>
  69. <legalnotice>
  70. <para>This manual page was written for the Debian system
  71. (and may be used by others).</para>
  72. <para>Permission is granted to copy, distribute and/or modify this
  73. document under the terms of the GNU General Public License,
  74. Version 2 or (at your option) any later version published by
  75. the Free Software Foundation.</para>
  76. <para>On Debian systems, the complete text of the GNU General Public
  77. License can be found in
  78. <filename>/usr/share/common-licenses/GPL</filename>.</para>
  79. </legalnotice>
  80. </refentryinfo>
  81. <refmeta>
  82. <refentrytitle>&dhucpackage;</refentrytitle>
  83. <manvolnum>&dhsection;</manvolnum>
  84. </refmeta>
  85. <refnamediv>
  86. <refname>&dhpackage;</refname>
  87. <refpurpose>program to do something</refpurpose>
  88. </refnamediv>
  89. <refsynopsisdiv>
  90. <cmdsynopsis>
  91. <command>&dhpackage;</command>
  92. <!-- These are several examples, how syntaxes could look -->
  93. <arg choice="plain"><option>-e <replaceable>this</replaceable></option></arg>
  94. <arg choice="opt"><option>--example=<parameter>that</parameter></option></arg>
  95. <arg choice="opt">
  96. <group choice="req">
  97. <arg choice="plain"><option>-e</option></arg>
  98. <arg choice="plain"><option>--example</option></arg>
  99. </group>
  100. <replaceable class="option">this</replaceable>
  101. </arg>
  102. <arg choice="opt">
  103. <group choice="req">
  104. <arg choice="plain"><option>-e</option></arg>
  105. <arg choice="plain"><option>--example</option></arg>
  106. </group>
  107. <group choice="req">
  108. <arg choice="plain"><replaceable>this</replaceable></arg>
  109. <arg choice="plain"><replaceable>that</replaceable></arg>
  110. </group>
  111. </arg>
  112. </cmdsynopsis>
  113. <cmdsynopsis>
  114. <command>&dhpackage;</command>
  115. <!-- Normally the help and version options make the programs stop
  116. right after outputting the requested information. -->
  117. <group choice="opt">
  118. <arg choice="plain">
  119. <group choice="req">
  120. <arg choice="plain"><option>-h</option></arg>
  121. <arg choice="plain"><option>--help</option></arg>
  122. </group>
  123. </arg>
  124. <arg choice="plain">
  125. <group choice="req">
  126. <arg choice="plain"><option>-v</option></arg>
  127. <arg choice="plain"><option>--version</option></arg>
  128. </group>
  129. </arg>
  130. </group>
  131. </cmdsynopsis>
  132. </refsynopsisdiv>
  133. <refsect1 id="description">
  134. <title>DESCRIPTION</title>
  135. <para>This manual page documents briefly the
  136. <command>&dhpackage;</command> and <command>bar</command>
  137. commands.</para>
  138. <para>This manual page was written for the Debian distribution
  139. because the original program does not have a manual page.
  140. Instead, it has documentation in the GNU <citerefentry>
  141. <refentrytitle>info</refentrytitle>
  142. <manvolnum>1</manvolnum>
  143. </citerefentry> format; see below.</para>
  144. <para><command>&dhpackage;</command> is a program that...</para>
  145. </refsect1>
  146. <refsect1 id="options">
  147. <title>OPTIONS</title>
  148. <para>The program follows the usual GNU command line syntax,
  149. with long options starting with two dashes (`-'). A summary of
  150. options is included below. For a complete description, see the
  151. <citerefentry>
  152. <refentrytitle>info</refentrytitle>
  153. <manvolnum>1</manvolnum>
  154. </citerefentry> files.</para>
  155. <variablelist>
  156. <!-- Use the variablelist.term.separator and the
  157. variablelist.term.break.after parameters to
  158. control the term elements. -->
  159. <varlistentry>
  160. <term><option>-e <replaceable>this</replaceable></option></term>
  161. <term><option>--example=<replaceable>that</replaceable></option></term>
  162. <listitem>
  163. <para>Does this and that.</para>
  164. </listitem>
  165. </varlistentry>
  166. <varlistentry>
  167. <term><option>-h</option></term>
  168. <term><option>--help</option></term>
  169. <listitem>
  170. <para>Show summary of options.</para>
  171. </listitem>
  172. </varlistentry>
  173. <varlistentry>
  174. <term><option>-v</option></term>
  175. <term><option>--version</option></term>
  176. <listitem>
  177. <para>Show version of program.</para>
  178. </listitem>
  179. </varlistentry>
  180. </variablelist>
  181. </refsect1>
  182. <refsect1 id="files">
  183. <title>FILES</title>
  184. <variablelist>
  185. <varlistentry>
  186. <term><filename>/etc/foo.conf</filename></term>
  187. <listitem>
  188. <para>The system-wide configuration file to control the
  189. behaviour of <application>&dhpackage;</application>. See
  190. <citerefentry>
  191. <refentrytitle>foo.conf</refentrytitle>
  192. <manvolnum>5</manvolnum>
  193. </citerefentry> for further details.</para>
  194. </listitem>
  195. </varlistentry>
  196. <varlistentry>
  197. <term><filename>${HOME}/.foo.conf</filename></term>
  198. <listitem>
  199. <para>The per-user configuration file to control the
  200. behaviour of <application>&dhpackage;</application>. See
  201. <citerefentry>
  202. <refentrytitle>foo.conf</refentrytitle>
  203. <manvolnum>5</manvolnum>
  204. </citerefentry> for further details.</para>
  205. </listitem>
  206. </varlistentry>
  207. </variablelist>
  208. </refsect1>
  209. <refsect1 id="environment">
  210. <title>ENVIRONMENT</title>
  211. <variablelist>
  212. <varlistentry>
  213. <term><envar>FOO_CONF</envar></term>
  214. <listitem>
  215. <para>If used, the defined file is used as configuration
  216. file (see also <xref linkend="files"/>).</para>
  217. </listitem>
  218. </varlistentry>
  219. </variablelist>
  220. </refsect1>
  221. <refsect1 id="diagnostics">
  222. <title>DIAGNOSTICS</title>
  223. <para>The following diagnostics may be issued
  224. on <filename class="devicefile">stderr</filename>:</para>
  225. <variablelist>
  226. <varlistentry>
  227. <term><errortext>Bad configuration file. Exiting.</errortext></term>
  228. <listitem>
  229. <para>The configuration file seems to contain a broken configuration
  230. line. Use the <option>--verbose</option> option, to get more info.
  231. </para>
  232. </listitem>
  233. </varlistentry>
  234. </variablelist>
  235. <para><command>&dhpackage;</command> provides some return codes, that can
  236. be used in scripts:</para>
  237. <segmentedlist>
  238. <segtitle>Code</segtitle>
  239. <segtitle>Diagnostic</segtitle>
  240. <seglistitem>
  241. <seg><errorcode>0</errorcode></seg>
  242. <seg>Program exited successfully.</seg>
  243. </seglistitem>
  244. <seglistitem>
  245. <seg><errorcode>1</errorcode></seg>
  246. <seg>The configuration file seems to be broken.</seg>
  247. </seglistitem>
  248. </segmentedlist>
  249. </refsect1>
  250. <refsect1 id="bugs">
  251. <!-- Or use this section to tell about upstream BTS. -->
  252. <title>BUGS</title>
  253. <para>The program is currently limited to only work
  254. with the <package>foobar</package> library.</para>
  255. <para>The upstreams <acronym>BTS</acronym> can be found
  256. at <ulink url="http://bugzilla.foo.tld"/>.</para>
  257. </refsect1>
  258. <refsect1 id="see_also">
  259. <title>SEE ALSO</title>
  260. <!-- In alpabetical order. -->
  261. <para><citerefentry>
  262. <refentrytitle>bar</refentrytitle>
  263. <manvolnum>1</manvolnum>
  264. </citerefentry>, <citerefentry>
  265. <refentrytitle>baz</refentrytitle>
  266. <manvolnum>1</manvolnum>
  267. </citerefentry>, <citerefentry>
  268. <refentrytitle>foo.conf</refentrytitle>
  269. <manvolnum>5</manvolnum>
  270. </citerefentry></para>
  271. <para>The programs are documented fully by <citetitle>The Rise and
  272. Fall of a Fooish Bar</citetitle> available via the <citerefentry>
  273. <refentrytitle>info</refentrytitle>
  274. <manvolnum>1</manvolnum>
  275. </citerefentry> system.</para>
  276. </refsect1>
  277. </refentry>