db2x_texixml(1)
β¨ db2x_texixml β¨
okay bestie, gather round π this is the db2x_texixml manual page from docbook2X (yes the whole suite, iykyk), and it's literally the glow-up machine that turns your Texi-XML into Texinfo. no cap. let's get into it π¦
πΈ SYNOPSIS πΈ
db2x_texixml [options]... [xml-document]
π DESCRIPTION π
so db2x_texixml converts a Texi-XML document into one or more Texinfo documents. slay.
if you don't hand it an xml-document, then the doc it converts comes from standard input. periodt.
the filenames of the Texinfo documents are decided by markup inside the Texi-XML source. (and if the filenames aren't specified in the markup, db2x_texixml tries to deduce them from the name of the input file. BUT β and this is the part you have to hear me out on β the Texi-XML source should specify the filename, because the deduce thing does not work when there are multiple output files, or when the Texi-XML source comes from standard input.) π
β¨ OPTIONS β¨
--encoding=encodingβ pick the character encoding used for the output files. the available encodings are the ones fromiconv(1). default isus-ascii. more on this below because it's a whole saga π--list-filesβ write a list of all the output files to standard output, in addition to normal processing. cute little receipt π§Ύ--output-dir=dirβ tell it the directory where the output files go. default is the current working directory. this option is ignored if the output is going to standard output (which happens when you use--to-stdout).--to-stdoutβ write the output to standard output instead of to individual files. if you use this even when there are supposed to be multiple output documents, then everything gets concatenated onto standard output. but beware: most other programs will NOT accept this concatenated output. also this option is incompatible with--list-files, obviously π--infoβ pipe the Texinfo output tomakeinfo(1), creating Info files directly instead of Texinfo files.--plaintextβ pipe the Texinfo output tomakeinfo --no-headers, which makes plain text files.--helpβ show brief usage info and dip. π--versionβ show version and dip.
π the encoding lore (yes it's a lot, stay with me) π
--encoding=encoding selects the character encoding for the output files. the available encodings are those of iconv(1). the default encoding is us-ascii.
the XML source may contain characters that are not representable in the encoding you picked β and in that case the program will bomb out during processing, and you should choose another encoding. (this is guaranteed not to happen with any Unicode encoding such as UTF-8, but unfortunately not everyone is able to process Unicode texts. π)
if you're using GNU's version of iconv(1), you can affix //TRANSLIT to the end of the encoding name to attempt transliterations of any unconvertible characters in the output. beware, however, that the really inconvertible characters will be turned into another one of those damned question marks. (aren't you sick of this? π)
the suffix //TRANSLIT applied to a Unicode encoding β in particular, utf-8//TRANSLIT β means that the output files are to remain in Unicode, but markup-level character translations using utf8trans are still to be done. so in most cases, an English-language document converted using --encoding=utf-8//TRANSLIT will actually end up as a US-ASCII document, but any untranslatable characters will remain as UTF-8 without any warning whatsoever. (note: strictly speaking this is not "transliteration".) this method of conversion is a compromise over strict --encoding=us-ascii processing, which aborts if any untranslatable characters are encountered.
heads up bestie: man pages and Texinfo documents in non-ASCII encodings (including UTF-8) may not be portable to older (non-internationalized) systems β which is literally why the default value for this option is us-ascii.
to suppress any automatic character mapping or encoding conversion whatsoever, pass the option --encoding=utf-8. π
π«Ά and where it finds its little helper programs π«Ά
this program uses certain other programs for its operation. if they're not in their default installed locations, then use these options to set their location:
--utf8trans-program=path,--utf8trans-map=charmapβ use the character mapcharmapwith theutf8trans(1)program, included with docbook2X, found underpath.--iconv-program=pathβ the location of theiconv(1)program, used for encoding conversions.
π NOTES π
Texinfo language compatibility π
the Texinfo files generated by db2x_texixml sometimes require Texinfo version 4.7 (the latest version) to work properly. in particular:
db2x_texixmlrelies onmakeinfoto automatically add punctuation after a@refif it isn't already there. otherwise the hyperlink will not work in the Info reader (althoughmakeinfowill not emit any error). π- the new
@comma{}command is used for commas (,) occurring inside argument lists to Texinfo commands, to disambiguate it from the comma used to separate different arguments. the only alternative otherwise would be to translate,to.which is obviously undesirable (but earlier docbook2X versions did this π). - if you can't use version 4.7 of
makeinfo, you can still use asedscript to perform manually the procedure just outlined.
Relation of Texi-XML with the XML output format of makeinfo π¦
the Texi-XML format used by docbook2X is different and incompatible with the XML format generated by makeinfo(1) with its --xml option. this situation arose partly because the Texi-XML format of docbook2X was designed and implemented independently before the appearance of makeinfo's XML format. also Texi-XML is very much geared towards being machine-generated from other XML formats, while there seem to be no non-trivial applications of makeinfo's XML format. so there is no reason at this point for docbook2X to adopt makeinfo's XML format in lieu of Texi-XML. periodt. π
π BUGS π
- Text wrapping in menus is utterly broken for non-ASCII text. it's probably also broken everywhere else in the output, but that would be makeinfo's fault. π
--list-filesmight not work correctly with--info. specifically, when the output Info file gets too big,makeinfowill decide to split it into parts namedabc.info-1,abc.info-2,abc.info-3, etc.db2x_texixmldoes not know exactly how many of these files there are, though you can just do anlsto find out. π
π AUTHOR π
Steve Cheng <stevecheng@users.sourceforge.net>.
πΈ SEE ALSO πΈ
The docbook2X manual (in Texinfo or HTML format) fully describes how to convert DocBook to man pages and Texinfo. π
up-to-date information about this program can be found at the docbook2X Web site β¨http://docbook2x.sourceforge.net/β©. β¨
the input to db2x_texixml is defined by the XML DTD present at dtd/Texi-XML in the docbook2X distribution. π§
k that's the whole thing, bestie π«Ά this was docbook2X 0.8.8, dated 3 March 2007 β yeah she's an elder but she still ate, fr fr. go convert something iconic πππ¦
π¦ where this page comes from
- alpine 3.22: docbook2x-doc 0.8.8-r10 Β· MIT
- alpine 3.23: docbook2x-doc 0.8.8-r10 Β· MIT
- alpine 3.24: docbook2x-doc 0.8.8-r10 Β· MIT
- arch rolling: docbook2x 0.8.8-19 Β· MIT
- centos-stream 10: docbook2X 0.8.8-50.el10 Β· MIT AND DocBook-XML
- centos-stream 9: docbook2X 0.8.8-40.el9 Β· MIT
- debian bookworm: docbook2x 0.8.8-17+b1
- fedora 43: docbook2X 0.8.8-50.fc43 Β· MIT
- fedora 44: docbook2X 0.8.8-52.fc44 Β· MIT
- nixos 26.05: docbook2X 0.8.8
- nixpkgs unstable: docbook2X 0.8.8
- opensuse-leap 16.0: docbook2x-doc 0.8.8-160000.2.2 Β· MIT
- opensuse-leap 16.0: docbook2x-doc 0.8.8-160000.2.2 Β· MIT
- opensuse-leap 16.0: docbook2x-doc 0.8.8-160000.2.2 Β· MIT
- opensuse-leap 16.0: docbook2x-doc 0.8.8-160000.2.2 Β· MIT
- ubuntu jammy: docbook2x 0.8.8-17
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms