File: db2x_texixml.html

package info (click to toggle)
docbook2x 0.8.8-17
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 4,724 kB
  • sloc: xml: 16,229; sh: 3,674; perl: 3,461; ansic: 639; makefile: 409; sed: 11
file content (329 lines) | stat: -rw-r--r-- 13,507 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!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">&lt;&lt; Previous</a>&nbsp;</td>
<th width="60%" align="center">Converting to Texinfo</th>
<td width="20%" align="right">&nbsp;<a accesskey="n" href=
"xsltproc.html">Next &gt;&gt;</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>
&mdash; 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&rsquo;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&rsquo;t you sick of this?)</p>
<p>The suffix <code class="literal">//TRANSLIT</code> applied to a
Unicode encoding &mdash; in particular, <code class=
"literal">utf-8//TRANSLIT</code> &mdash; 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 &ldquo;transliteration&rdquo;.) 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.&nbsp;</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>.&nbsp;</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>&rsquo;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>&rsquo;s XML format. So there is
no reason at this point for docbook2X to adopt <span><strong class=
"command">makeinfo</strong></span>&rsquo;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>&rsquo;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">&lt;&lt; Previous</a>&nbsp;</td>
<td width="20%" align="center"><a accesskey="u" href=
"texinfo.html">Up</a></td>
<td width="40%" align="right">&nbsp;<a accesskey="n" href=
"xsltproc.html">Next &gt;&gt;</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">docbook2texi&nbsp;</td>
<td width="20%" align="center"><a accesskey="h" href=
"docbook2X.html">Table of Contents</a></td>
<td width="40%" align="right" valign="top">&nbsp;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>