db2x_texixml(1)

πŸ“¦
version 0.8.8 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy

✨ 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 from iconv(1). default is us-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 to makeinfo(1), creating Info files directly instead of Texinfo files.
  • --plaintext β€” pipe the Texinfo output to makeinfo --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 map charmap with the utf8trans(1) program, included with docbook2X, found under path.
  • --iconv-program=path β€” the location of the iconv(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_texixml relies on makeinfo to automatically add punctuation after a @ref if it isn't already there. otherwise the hyperlink will not work in the Info reader (although makeinfo will 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 a sed script 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-files might not work correctly with --info. specifically, when the output Info file gets too big, makeinfo will decide to split it into parts named abc.info-1, abc.info-2, abc.info-3, etc. db2x_texixml does not know exactly how many of these files there are, though you can just do an ls to 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 πŸ’–πŸŽ€πŸ¦‹