docbook-to-man(1)

πŸ“¦
version 2.0.0 Β· 2 versions
  • 2.0.0 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.8.8 Β· opensuse-leap 16.0
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

docbook-to-man β€” bestie, this is the girlboss that converts DocBook SGML straight into roff -man macros. She takes your fancy XML-ish source and hands you back a manpage. Slay.


✨ SYNOPSIS ✨

docbook-to-man [source.sgml]  [>]  [destination.1]

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, docbook-to-man is a batch converter, okay? It transforms UNIX-style manpages from the DocBook SGML DTD into nroff/troff -man macros. No cap.

docbook-to-man is the shell command that runs all the low-level components to translate a single DocBook SGML document instance β€” and yes, its document element has to be <RefEntry> β€” into pretty-much vanilla -man macros, with tables rendered in tbl. It's giving ✨pipeline✨.

Quick lore drop: this is not the original version by Fred Dalrymple, it's the one with the ANS Modifications by David Bolen (db3l@ans.net). Respect the lineage πŸ’…

This manual page and some small changes are by W. Borgert debacle@debian.org for Debian GNU/Linux. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. (Translation: the docs are free, go wild, just keep it that way 🫢)


🌸 White space and special characters 🌸

Want tabs in your manpage? Adorable. Use <programlisting>, <literal> or <screen> and invoke docbook-to-man with INSTANT_OPT set to a tab character. Just know that multiple tabs will be collapsed into one β€” the audacity, honestly 😭

Want to collapse white space into one? Invoke docbook-to-man with INSTANT_OPT set to a space character.

Special characters like \, ' or . will not be interpreted if you set INSTANT_OPT to a space or tab character. Protected. Guarded. Main character energy πŸ‘‘


🧚 ENVIRONMENT 🧚

If the variable INSTANT_OPT is not set, then instant(1) is called with the parameter -d by docbook-to-man. If you don't want that β€” like, say, you want to use some special characters literally in your SGML file β€” you can set INSTANT_OPT to just a space character:

INSTANT_OPT=" " docbook-to-man src.sgml > dst.1
Note: the better way to use special characters like ^ or > is to write them in the SGML way, i.e. &caret; or &gt;. Do it the right way, bestie, it's so much cleaner πŸŽ€

Copyright (c) 1996 X Consortium

Copyright (c) 1996 Dalrymple Consulting

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the names of the X Consortium and Dalrymple Consulting shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.

Yes bestie, all caps legal text is scary but it just means: no warranty, don't sue us, and don't use our names to sell stuff without permission. The whole thing is required, so here it is, unedited, periodt.

πŸ”₯ See also πŸ”₯


And that's the whole page, my love πŸ’œ β€” this one lives in section 1 of the manual, the General Commands Manual, and yeah the footer is literally just docbook-to-man(1) all over again. Go forth and convert, you're doing amazing sweetie πŸŒˆπŸ¦‹β­