Blob Blame History Raw
.\" -*- coding: us-ascii -*-
.if \n(.g .ds T< \\FC
.if \n(.g .ds T> \\F[\n[.fam]]
.de URL
\\$2 \(la\\$1\(ra\\$3
..
.if \n(.g .mso www.tmac
.TH db2x_texixml 1 "3 March 2007" "docbook2X 0.8.8" docbook2X
.SH NAME
db2x_texixml \- Make Texinfo files from Texi-XML
.SH SYNOPSIS
'nh
.fi
.ad l
\fBdb2x_texixml\fR \kx
.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
'in \n(.iu+\nxu
[options]\&... [\fIxml-document\fR]
'in \n(.iu-\nxu
.ad b
'hy
.SH DESCRIPTION
\fBdb2x_texixml\fR converts a Texi-XML document into one or 
more Texinfo documents.
.PP
If \fIxml-document\fR is not given, then the document
to convert comes from standard input. 
.PP
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 \fBdb2x_texixml\fR 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.)
.SH OPTIONS
.TP 
\*(T<\fB\-\-encoding=\fR\*(T>\fIencoding\fR
Select the character encoding used for the output files.
The available encodings are those of 
\fBiconv\fR(1). 
The default encoding is \*(T<us\-ascii\*(T>. 

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.)

If you are using GNU\(cqs version of 
\fBiconv\fR(1), you can affix 
\*(T<//TRANSLIT\*(T> 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\(cqt you sick of this?)

The suffix \*(T<//TRANSLIT\*(T> applied
to a Unicode encoding \(em in particular, \*(T<utf\-8//TRANSLIT\*(T> \(em
means that the output files are to remain in Unicode,
but markup-level character translations using \fButf8trans\fR 
are still to be done. So in most cases, an English-language
document, converted using 
\*(T<\fB\-\-encoding=\fR\*(T>\*(T<\fButf\-8//TRANSLIT\fR\*(T>
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 \(lqtransliteration\(rq.)
This method of conversion is a compromise over strict
\*(T<\fB\-\-encoding=\fR\*(T>\*(T<\fBus\-ascii\fR\*(T>
processing, which aborts if any untranslatable characters are 
encountered.

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 
\*(T<us\-ascii\*(T>.

To suppress any automatic character mapping or encoding conversion
whatsoever, pass the option 
\*(T<\fB\-\-encoding=\fR\*(T>\*(T<\fButf\-8\fR\*(T>.
.TP 
\*(T<\fB\-\-list\-files\fR\*(T>
Write a list of all the output files to standard output,
in addition to normal processing.
.TP 
\*(T<\fB\-\-output\-dir=\fR\*(T>\fIdir\fR
Specify the directory where the output files are placed.
The default is the current working directory.

This option is ignored if the output is to be written
to standard output (triggered by the 
option \*(T<\fB\-\-to\-stdout\fR\*(T>).
.TP 
\*(T<\fB\-\-to\-stdout\fR\*(T>
Write the output to standard output instead of to individual files.

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.

This option is incompatible with \*(T<\fB\-\-list\-files\fR\*(T>,
obviously.
.TP 
\*(T<\fB\-\-info\fR\*(T>
Pipe the Texinfo output to 
\fBmakeinfo\fR(1),
creating Info files directly instead of
Texinfo files.
.TP 
\*(T<\fB\-\-plaintext\fR\*(T>
Pipe the Texinfo output to \fBmakeinfo
\*(T<\fB\-\-no\-headers\fR\*(T>\fR, thereby creating
plain text files.
.TP 
\*(T<\fB\-\-help\fR\*(T>
Show brief usage information and exit.
.TP 
\*(T<\fB\-\-version\fR\*(T>
Show version and exit.
.PP
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:
.TP 
\*(T<\fB\-\-utf8trans\-program=\fR\*(T>\fIpath\fR, \*(T<\fB\-\-utf8trans\-map=\fR\*(T>\fIcharmap\fR
Use the character map \fIcharmap\fR
with the \fButf8trans\fR(1) program, included with docbook2X, found
under \fIpath\fR.
.TP 
\*(T<\fB\-\-iconv\-program=\fR\*(T>\fIpath\fR
The location of the 
\fBiconv\fR(1) program, used for encoding
conversions.
.SH NOTES
\fBTexinfo language compatibility\fR. 
The Texinfo files generated by \fBdb2x_texixml\fR sometimes require
Texinfo version 4.7 (the latest version) to work properly.
In particular:
.TP 0.2i
\(bu
\fBdb2x_texixml\fR relies on \fBmakeinfo\fR
to automatically add punctuation after a \*(T<@ref\*(T>
if it it not already there. Otherwise the hyperlink will 
not work in the Info reader (although
\fBmakeinfo\fR will not emit any error).
.TP 0.2i
\(bu
The new \*(T<@comma{}\*(T> command is used for commas
(\*(T<,\*(T>) 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 \*(T<,\*(T> to 
\*(T<\&.\*(T>
which is obviously undesirable (but earlier docbook2X versions
did this).

If you cannot use version 4.7 of
\fBmakeinfo\fR, you can still use a
\fBsed\fR script to perform manually the procedure 
just outlined.
.PP
\fBRelation of Texi-XML with the XML output format of makeinfo\fR. 
The Texi-XML format used by docbook2X is \fIdifferent\fR
and incompatible with the XML format generated by 
\fBmakeinfo\fR(1)
with its \*(T<\fB\-\-xml\fR\*(T> option.
This situation arose partly because the Texi-XML format
of docbook2X was designed and implemented independently 
before the appearance
of \fBmakeinfo\fR\(cqs XML format.
Also Texi-XML is very much geared towards being 
\fImachine-generated from other XML formats\fR,
while there seems to be no non-trivial applications
of \fBmakeinfo\fR\(cqs XML format.
So there is no reason at this point for docbook2X
to adopt \fBmakeinfo\fR\(cqs XML format
in lieu of Texi-XML.
.SH BUGS
.TP 0.2i
\(bu
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 \fBmakeinfo\fR\(cqs fault.
.TP 0.2i
\(bu
\*(T<\fB\-\-list\-files\fR\*(T> might not work correctly
with \*(T<\fB\-\-info\fR\*(T>. Specifically, when the output
Info file get too big, \fBmakeinfo\fR will decide
to split it into parts named 
\*(T<\fIabc.info\-1\fR\*(T>,
\*(T<\fIabc.info\-2\fR\*(T>,
\*(T<\fIabc.info\-3\fR\*(T>, etc.
\fBdb2x_texixml\fR does not know exactly how many of these files
there are, though you can just do an \fBls\fR 
to find out.
.SH AUTHOR
Steve Cheng <\*(T<stevecheng@users.sourceforge.net\*(T>>.
.SH "SEE ALSO"
The docbook2X manual (in Texinfo or HTML format) fully describes
how to convert DocBook to man pages and Texinfo.
.PP
Up-to-date information about this program
can be found 
at the 
.URL http://docbook2x.sourceforge.net/ "docbook2X Web site"
\&.
.PP
The input to \fBdb2x_texixml\fR is defined by the XML DTD
present at \*(T<\fIdtd/Texi\-XML\fR\*(T> in the docbook2X
distribution.