<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="generator" content= "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" /> <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii" /> <title>docbook2X: db2x_texixml</title> <link rel="stylesheet" href="docbook2X.css" type="text/css" /> <link rev="made" href="mailto:stevecheng@users.sourceforge.net" /> <meta name="generator" content="DocBook XSL Stylesheets V1.68.1" /> <link rel="start" href="docbook2X.html" title= "docbook2X: Documentation Table of Contents" /> <link rel="up" href="texinfo.html" title= "docbook2X: Converting to Texinfo" /> <link rel="prev" href="docbook2texi.html" title= "docbook2X: docbook2texi" /> <link rel="next" href="xsltproc.html" title= "docbook2X: The XSLT stylesheets" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center"><span><strong class= "command">db2x_texixml</strong></span></th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href= "docbook2texi.html"><< Previous</a> </td> <th width="60%" align="center">Converting to Texinfo</th> <td width="20%" align="right"> <a accesskey="n" href= "xsltproc.html">Next >></a></td> </tr> </table> <hr /></div> <div class="refentry" lang="en" xml:lang="en"><a id="db2x_texixml" name="db2x_texixml"></a> <div class="titlepage"></div> <a id="id2531802" class="indexterm" name="id2531802"></a><a id= "id2531808" class="indexterm" name="id2531808"></a><a id= "id2531815" class="indexterm" name="id2531815"></a><a id= "id2531822" class="indexterm" name="id2531822"></a><a id= "id2531829" class="indexterm" name="id2531829"></a><a id= "id2531835" class="indexterm" name="id2531835"></a> <div class="refnamediv"> <h2>Name</h2> <p><span><strong class="command">db2x_texixml</strong></span> — Make Texinfo files from Texi-XML</p> </div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <div class="cmdsynopsis"> <p><code class="command">db2x_texixml</code> [options...] [<em class="replaceable"><code>xml-document</code></em>]</p> </div> </div> <div class="refsect1" lang="en" xml:lang="en"><a id="id2531912" name="id2531912"></a> <h2>Description</h2> <p><span><strong class="command">db2x_texixml</strong></span> converts a Texi-XML document into one or more Texinfo documents.</p> <p>If <em class="replaceable"><code>xml-document</code></em> is not given, then the document to convert comes from standard input.</p> <p>The filenames of the Texinfo documents are determined by markup in the Texi-XML source. (If the filenames are not specified in the markup, then <span><strong class= "command">db2x_texixml</strong></span> attempts to deduce them from the name of the input file. However, the Texi-XML source should specify the filename, because it does not work when there are multiple output files or when the Texi-XML source comes from standard input.)</p> </div> <div class="refsect1" lang="en" xml:lang="en"><a id="id2531953" name="id2531953"></a> <h2>Options</h2> <div class="variablelist"> <dl> <dt><span class="term"><code class="option">--encoding=<em class= "replaceable"><code>encoding</code></em></code></span></dt> <dd> <p>Select the character encoding used for the output files. The available encodings are those of <span class= "citerefentry"><span class="refentrytitle"><span><strong class= "command">iconv</strong></span></span></span>. The default encoding is <code class="literal">us-ascii</code>.</p> <p>The XML source may contain characters that are not representable in the encoding that you select; in this 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.)</p> <p>If you are using GNU’s version of <span class= "citerefentry"><span class="refentrytitle"><span><strong class= "command">iconv</strong></span></span></span>, you can affix <code class="literal">//TRANSLIT</code> 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 of those damned question marks. (Aren’t you sick of this?)</p> <p>The suffix <code class="literal">//TRANSLIT</code> applied to a Unicode encoding — in particular, <code class= "literal">utf-8//TRANSLIT</code> — means that the output files are to remain in Unicode, but markup-level character translations using <span><strong class= "command">utf8trans</strong></span> are still to be done. So in most cases, an English-language document, converted using <code class="option">--encoding=<code class= "literal">utf-8//TRANSLIT</code></code> 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 <code class= "option">--encoding=<code class="literal">us-ascii</code></code> processing, which aborts if any untranslatable characters are encountered.</p> <p>Note that man pages and Texinfo documents in non-ASCII encodings (including UTF-8) may not be portable to older (non-internationalized) systems, which is why the default value for this option is <code class="literal">us-ascii</code>.</p> <p>To suppress any automatic character mapping or encoding conversion whatsoever, pass the option <code class= "option">--encoding=<code class="literal">utf-8</code></code>.</p> </dd> <dt><span class="term"><code class= "option">--list-files</code></span></dt> <dd> <p>Write a list of all the output files to standard output, in addition to normal processing.</p> </dd> <dt><span class="term"><code class="option">--output-dir=<em class= "replaceable"><code>dir</code></em></code></span></dt> <dd> <p>Specify the directory where the output files are placed. The default is the current working directory.</p> <p>This option is ignored if the output is to be written to standard output (triggered by the option <code class= "option">--to-stdout</code>).</p> </dd> <dt><span class="term"><code class= "option">--to-stdout</code></span></dt> <dd> <p>Write the output to standard output instead of to individual files.</p> <p>If this option is used even when there are supposed to be multiple output documents, then everything is concatenated to standard output. But beware that most other programs will not accept this concatenated output.</p> <p>This option is incompatible with <code class= "option">--list-files</code>, obviously.</p> </dd> <dt><span class="term"><code class= "option">--info</code></span></dt> <dd> <p>Pipe the Texinfo output to <span class= "citerefentry"><span class="refentrytitle"><span><strong class= "command">makeinfo</strong></span></span></span>, creating Info files directly instead of Texinfo files.</p> </dd> <dt><span class="term"><code class= "option">--plaintext</code></span></dt> <dd> <p>Pipe the Texinfo output to <span><strong class= "command">makeinfo <code class= "option">--no-headers</code></strong></span>, thereby creating plain text files.</p> </dd> <dt><span class="term"><code class= "option">--help</code></span></dt> <dd> <p>Show brief usage information and exit.</p> </dd> <dt><span class="term"><code class= "option">--version</code></span></dt> <dd> <p>Show version and exit.</p> </dd> </dl> </div> <p>This program uses certain other programs for its operation. If they are not in their default installed locations, then use the following options to set their location:</p> <div class="variablelist"> <dl> <dt><span class="term"><code class= "option">--utf8trans-program=<em class= "replaceable"><code>path</code></em></code>,</span> <span class= "term"><code class="option">--utf8trans-map=<em class= "replaceable"><code>charmap</code></em></code></span></dt> <dd> <p>Use the character map <em class= "replaceable"><code>charmap</code></em> with the <a href= "utf8trans.html"><span><strong class= "command">utf8trans</strong></span></a> program, included with docbook2X, found under <em class= "replaceable"><code>path</code></em>.</p> </dd> <dt><span class="term"><code class= "option">--iconv-program=<em class= "replaceable"><code>path</code></em></code></span></dt> <dd> <p>The location of the <span class="citerefentry"><span class= "refentrytitle"><span><strong class= "command">iconv</strong></span></span></span> program, used for encoding conversions.</p> </dd> </dl> </div> </div> <div class="refsect1" lang="en" xml:lang="en"><a id="id2532365" name="id2532365"></a> <h2>Notes</h2> <p><b>Texinfo language compatibility. </b> <a id="id2532378" class="indexterm" name="id2532378"></a> The Texinfo files generated by <span><strong class="command">db2x_texixml</strong></span> sometimes require Texinfo version 4.7 (the latest version) to work properly. In particular:</p> <div class="itemizedlist"> <ul> <li> <p><span><strong class="command">db2x_texixml</strong></span> relies on <span><strong class="command">makeinfo</strong></span> to automatically add punctuation after a <span class= "markup">@ref</span> if it it not already there. Otherwise the hyperlink will not work in the Info reader (although <span><strong class="command">makeinfo</strong></span> will not emit any error).</p> </li> <li> <p>The new <span class="markup">@comma{}</span> command is used for commas (<code class="literal">,</code>) 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 <code class="literal">,</code> to <code class="literal">.</code> which is obviously undesirable (but earlier docbook2X versions did this).</p> <p>If you cannot use version 4.7 of <span><strong class= "command">makeinfo</strong></span>, you can still use a <span><strong class="command">sed</strong></span> script to perform manually the procedure just outlined.</p> </li> </ul> </div> <p><b>Relation of Texi-XML with the XML output format of <span><strong class="command">makeinfo</strong></span>. </b> The Texi-XML format used by docbook2X is <span class= "emphasis"><em>different</em></span> and incompatible with the XML format generated by <span class="citerefentry"><span class= "refentrytitle"><span><strong class= "command">makeinfo</strong></span></span></span> with its <code class="option">--xml</code> option. This situation arose partly because the Texi-XML format of docbook2X was designed and implemented independently before the appearance of <span><strong class="command">makeinfo</strong></span>’s XML format. Also Texi-XML is very much geared towards being <span class="emphasis"><em>machine-generated from other XML formats</em></span>, while there seems to be no non-trivial applications of <span><strong class= "command">makeinfo</strong></span>’s XML format. So there is no reason at this point for docbook2X to adopt <span><strong class= "command">makeinfo</strong></span>’s XML format in lieu of Texi-XML.</p> </div> <div class="refsect1" lang="en" xml:lang="en"><a id="id2532545" name="id2532545"></a> <h2>Bugs</h2> <div class="itemizedlist"> <ul> <li> <p>Text wrapping in menus is utterly broken for non-ASCII text. It is probably also broken everywhere else in the output, but that would be <span><strong class= "command">makeinfo</strong></span>’s fault.</p> </li> <li> <p><code class="option">--list-files</code> might not work correctly with <code class="option">--info</code>. Specifically, when the output Info file get too big, <span><strong class= "command">makeinfo</strong></span> will decide to split it into parts named <code class="filename"><em class= "replaceable"><code>abc</code></em>.info-1</code>, <code class= "filename"><em class= "replaceable"><code>abc</code></em>.info-2</code>, <code class= "filename"><em class= "replaceable"><code>abc</code></em>.info-3</code>, etc. <span><strong class="command">db2x_texixml</strong></span> does not know exactly how many of these files there are, though you can just do an <span><strong class="command">ls</strong></span> to find out.</p> </li> </ul> </div> </div> <div class="refsect1" lang="en" xml:lang="en"><a id="id2532646" name="id2532646"></a> <h2>See Also</h2> <p>The input to <span><strong class= "command">db2x_texixml</strong></span> is defined by the XML DTD present at <code class="filename">dtd/Texi-XML</code> in the docbook2X distribution.</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href= "docbook2texi.html"><< Previous</a> </td> <td width="20%" align="center"><a accesskey="u" href= "texinfo.html">Up</a></td> <td width="40%" align="right"> <a accesskey="n" href= "xsltproc.html">Next >></a></td> </tr> <tr> <td width="40%" align="left" valign="top">docbook2texi </td> <td width="20%" align="center"><a accesskey="h" href= "docbook2X.html">Table of Contents</a></td> <td width="40%" align="right" valign="top"> The XSLT stylesheets</td> </tr> </table> </div> <p class="footer-homepage"><a href= "http://docbook2x.sourceforge.net/" title= "docbook2X: Home page">docbook2X home page</a></p> </body> </html>