File: texinfo.xml

package info (click to toggle)
docbook2x 0.8.8-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,740 kB
  • sloc: xml: 16,229; sh: 3,674; perl: 3,461; ansic: 639; makefile: 409; sed: 11
file content (405 lines) | stat: -rw-r--r-- 11,127 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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<?xml version="1.0" encoding="utf-8" ?>
<!-- vim: sta et sw=2
-->
<sect1 id="texinfo" xreflabel="Converting to Texinfo">
<sect1info>
<abstract role="texinfo-node">
  <para>Details on Texinfo conversion</para>
</abstract>
</sect1info>

<title>Converting to Texinfo</title>

<indexterm><primary>Texinfo</primary></indexterm>
<indexterm><primary>converting to Texinfo</primary></indexterm>
<indexterm><primary>XSLT stylesheets</primary></indexterm>
<indexterm><primary>Texi-XML</primary></indexterm>

<para>
DocBook documents are converted to Texinfo in two steps:

<orderedlist>
<listitem>
<para>
The DocBook source is converted by a XSLT stylesheet into an intermediate
XML format, Texi-XML.</para>

<para>
Texi-XML is simpler than DocBook and closer to the Texinfo format;
it is intended to make the stylesheets’ job easier.
</para>

<para>
The stylesheet for this purpose is in
<filename>xslt/texi/docbook.xsl</filename>.
For portability, it should always be referred to
by the following URI:
<synopsis
>http://docbook2x.sourceforge.net/latest/xslt/texi/docbook.xsl
</synopsis>
</para>

<para>
Run this stylesheet with &db2x_xsltproc_ref;.
</para>

<indexterm><primary>customizing</primary></indexterm>
<formalpara>
<title>Customizing</title>
<para>
You can also customize the output by
creating your own XSLT stylesheet —
changing parameters or adding new templates —
and importing <filename>xslt/texi/docbook.xsl</filename>.
</para>
</formalpara>

</listitem>

<listitem>
<para>
Texi-XML is converted to the actual Texinfo files by &db2x_texixml_ref;.
</para>
</listitem>
</orderedlist>

</para>

<para>
The &docbook2texi_ref; command does both steps automatically,
but if any problems occur, you can see the errors more clearly
if you do each step separately:

<screen
><prompt>$ </prompt><userinput>db2x_xsltproc -s texi <replaceable>mydoc</replaceable>.xml -o <replaceable>mydoc</replaceable>.txml</userinput>
<prompt>$ </prompt><userinput>db2x_texixml <replaceable>mydoc</replaceable>.txml</userinput>
</screen>

</para>

<para>
Options to the conversion stylesheet are described
in <olink targetdocent="docbook2texi-xslt">the Texinfo stylesheets
reference</olink>.
</para>


<!-- ==================================================================== -->
<refentry id="docbook2texi">
<indexterm><primary>Texinfo</primary></indexterm>
<indexterm><primary>converting to Texinfo</primary></indexterm>
<indexterm><primary>wrapper script</primary></indexterm>
<indexterm><primary>&docbook2texi;</primary></indexterm>
<refentryinfo>
<titleabbrev role="texinfo-node">&docbook2texi; wrapper script</titleabbrev>
</refentryinfo>

<refmeta>
<refentrytitle>docbook2texi</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
<refname>&docbook2texi;</refname>
<refpurpose>Convert DocBook to Texinfo</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>docbook2texi</command>
<arg><replaceable>options</replaceable></arg>
<arg choice='plain'><replaceable>xml-document</replaceable></arg>
</cmdsynopsis>

</refsynopsisdiv>

<refsect1>
<title>Description</title>

<para>
&docbook2texi; converts the given 
DocBook XML document into one or more Texinfo documents.
By default, these Texinfo documents will be output to the current
directory.
</para>

<para>
The &docbook2texi; command is a wrapper script
for a two-step conversion process.
<phrase role="man-page">See the section “CONVERSION PROCESS” below
for details.</phrase>
</para>

</refsect1>

<refsect1>
<title>Options</title>

<para>
The available options are essentially the union of the options
for &db2x_xsltproc_ref; and &db2x_texixml_ref;.
</para>

<para>
Some commonly-used options are listed below:
</para>

<variablelist>
  &wrapper-script-common-options;
</variablelist>

<refsect2>
<title>Stylesheet parameters</title>
<indexterm><primary>stylesheet parameters</primary></indexterm>
&docbook2texi-param;
</refsect2>

</refsect1>

<refsect1>
<title>Examples</title>
<indexterm><primary>example usage</primary></indexterm>

<informalexample>
<screen
><prompt>$ </prompt><userinput>docbook2texi tdg.xml</userinput>
<prompt>$ </prompt><userinput>docbook2texi --encoding=utf-8//TRANSLIT tdg.xml</userinput>
<prompt>$ </prompt><userinput>docbook2texi --string-param semantic-decorations=0 tdg.xml</userinput>
</screen>
</informalexample>
</refsect1>

<refsect1 role="man-page">
<title>Conversion process</title>

<?man-SS-include texinfo?>
<?man-SS-include charsets?>

<!-- Dummy element, needed to satisfy DTD content model -->
<remark role="html" />

</refsect1>

<refsect1 role="man-page">
<title>Files</title>
<simplelist type="vert">
<member><filename><?install-datadir?>xslt/texi/docbook.xsl</filename></member>
<member><filename><?install-datadir?>xslt/backend/db2x_texixml.xsl</filename></member>
<member><filename><?install-datadir?>xslt/catalog.xml</filename></member>
<member><filename><?install-datadir?>charmaps/texi.charmap.xml</filename></member>
<member><filename><?install-datadir?>charmaps/texi.charmap.xml</filename></member>
</simplelist>
<para>
The above files are distributed and installed by the docbook2X package.
</para>
</refsect1>

&wrapper-script-notes;
&wrapper-script-limitations;
&man-page-author-section;

<refsect1 role="man-page">
<title>See Also</title>

<simplelist type="inline">
<member>&db2x_xsltproc_ref;</member>
<member>&db2x_texixml_ref;</member>
<member>&utf8trans_ref;</member>
</simplelist>

&man-page-see-also;
</refsect1>

</refentry>

<!-- ==================================================================== -->


<refentry id="db2x_texixml">
<indexterm><primary>Texinfo</primary></indexterm>
<indexterm><primary>converting to Texinfo</primary></indexterm>
<indexterm><primary>Texi-XML</primary></indexterm>
<indexterm><primary>encoding</primary></indexterm>
<indexterm><primary>output directory</primary></indexterm>
<indexterm><primary>&makeinfo;</primary></indexterm>
<refmeta>
<refentrytitle id="db2x_texixml_name">&db2x_texixml;</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
<refname>&db2x_texixml;</refname>
<refpurpose>Make Texinfo files from Texi-XML</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>db2x_texixml</command>
<arg rep="repeat">options</arg>
<arg><replaceable>xml-document</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
<title>Description</title>

<para>
&db2x_texixml; converts a Texi-XML document into one or 
more Texinfo documents.
</para>

<para>
If <replaceable>xml-document</replaceable> is not given, then the document
to convert comes from standard input.  
</para>

<para>
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 &db2x_texixml; 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.)
</para>

</refsect1>


<refsect1>
<title>Options</title>

<variablelist>
&db2x_-common-options;

  <varlistentry>
    <term><option>--info</option></term>
    <listitem>
      <para>Pipe the Texinfo output to &makeinfo_ref;,
            creating Info files directly instead of
            Texinfo files.</para>
    </listitem>
  </varlistentry>
  
  <varlistentry>
    <term><option>--plaintext</option></term>
    <listitem>
      <para>Pipe the Texinfo output to <command>makeinfo
            <option>--no-headers</option></command>, thereby creating
            plain text files.</para>
    </listitem>
  </varlistentry>

&common-options;

</variablelist>

&db2x_-path-options;

</refsect1>

<refsect1>
  <title>Notes</title>

  <formalpara>
  <title>Texinfo language compatibility</title>
  <para>
    <indexterm><primary>compatibility</primary></indexterm>
    The Texinfo files generated by &db2x_texixml; sometimes require
    Texinfo version 4.7 (the latest version) to work properly.
    In particular:
    
    <itemizedlist>
      <listitem><para>   
        &db2x_texixml; relies on &makeinfo;
        to automatically add punctuation after a <markup>@ref</markup>
        if it it not already there.  Otherwise the hyperlink will 
        not work in the Info reader (although
        &makeinfo; will not emit any error).
      </para></listitem>

      <listitem><para>
        The new <markup>@comma{}</markup> command is used for commas
        (<literal>,</literal>) 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 <literal>,</literal> to 
        <literal>.</literal>
        which is obviously undesirable (but earlier docbook2X versions
        did this).</para>

        <para>If you cannot use version 4.7 of
        &makeinfo;, you can still use a
        <command>sed</command> script to perform manually the procedure 
        just outlined.</para>
      </listitem>
    </itemizedlist>
  </para>
  </formalpara>

  <formalpara>
  <title>Relation of Texi-XML with the XML output format of &makeinfo;</title>
  <para>
    The Texi-XML format used by docbook2X is <emphasis>different</emphasis>
    and incompatible with the XML format generated by &makeinfo_ref;
    with its <option>--xml</option> 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 
    <emphasis>machine-generated from other XML formats</emphasis>,
    while there seems 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.
  </para>
  </formalpara>

</refsect1>
      

<refsect1>
  <title>Bugs</title>

  <itemizedlist>
    <listitem><para>
      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 &makeinfo;’s fault.
    </para></listitem>
    
    <listitem><para>
      <option>--list-files</option> might not work correctly
      with <option>--info</option>.  Specifically, when the output
      Info file get too big, &makeinfo; will decide
      to split it into parts named 
      <filename><replaceable>abc</replaceable>.info-1</filename>,
      <filename><replaceable>abc</replaceable>.info-2</filename>,
      <filename><replaceable>abc</replaceable>.info-3</filename>, etc.
      &db2x_texixml; does not know exactly how many of these files
      there are, though you can just do an <command>ls</command> 
      to find out.
    </para></listitem>
  </itemizedlist>
</refsect1>

&man-page-author-section;

<refsect1>
<title>See Also</title>

&man-page-see-also;

<para>
The input to &db2x_texixml; is defined by the XML DTD
present at <filename>dtd/Texi-XML</filename> in the docbook2X
distribution.
</para>

</refsect1>

</refentry>

</sect1>