Next: Format with tex/texindex, Previous: Use TeX, Up: Hardcopy [Contents][Index]
texi2dvi
The texi2dvi
program takes care of all the steps for producing
a TeX DVI file from a Texinfo document. Similarly, texi2pdf
produces a PDF file.
To run texi2dvi
or texi2pdf
on an input file
foo.texi, do this (where ‘prompt$ ’ is your shell prompt):
prompt$ texi2dvi foo.texi prompt$ texi2pdf foo.texi
As shown in this example, the input filenames to texi2dvi
and
texi2pdf
must include any extension, such as ‘.texi’.
(Under MS-DOS and perhaps in other circumstances, you may need to run
‘sh texi2dvi foo.texi’ instead of relying on the operating system
to invoke the shell on the ‘texi2dvi’ script.)
One useful option to texi2dvi
is ‘--command=cmd’.
This inserts cmd on a line by itself after the
@setfilename
in a temporary copy of the input file before
running TeX. With this, you can specify different printing
formats, such as @smallbook
(see @smallbook),
@afourpaper
(see A4 Paper), or @pagesizes
(see @pagesizes), without actually changing the document
source. (You can also do this on a site-wide basis with
texinfo.cnf; see Preparing for TeX).
With the --pdf option, texi2dvi
produces PDF output
instead of DVI (see PDF Output), by running pdftex
instead of tex
. Alternatively, the command
texi2pdf
is an abbreviation for running ‘texi2dvi
--pdf’. The command pdftexi2dvi
is also provided as a
convenience for AUC-TeX (see AUC-TeX, as it
prefers to merely prepend ‘pdf’ to DVI producing tools to have
PDF producing tools.
With the --dvipdf option, texi2dvi
produces PDF
output by running TeX and then a DVI-to-PDF program: if the
DVIPDF
environment variable is set, that value is used, else the
first program extant among dvipdfmx
, dvipdfm
,
dvipdf
, dvi2pdf
, dvitopdf
. This method generally
supports CJK typesetting better than pdftex
.
With the --ps option, texi2dvi
produces PostScript
instead of DVI, by running tex
and then dvips
(see Dvips). (Or the value of the DVIPS
environment variable, if set.)
texi2dvi
can also be used to process LaTeX files.
Normally texi2dvi
is able to guess the input file language
by its contents and file name extension; however, if it guesses wrong
you can explicitly specify the input language using
--language=lang command line option, where lang
is either ‘latex’ or ‘texinfo’.
texi2dvi
will use etex
(or pdfetex
) if
they are available; this extended version of TeX is not required,
and the DVI output is identical, but it runs faster in some cases, and
provide additional tracing information when debugging
texinfo.tex. (These days, pdftex
and
pdfetex
are exactly the same, but we still run
pdfetex
to cater to ancient TeX installations.)
The option -E (equivalently, -e and
--expand) does Texinfo macro expansion using
makeinfo
instead of the TeX implementation (see Macro Details). Each implementation has its own limitations and
advantages. If this option is used, the string
@c _texi2dvi
must not appear at the beginning of a line
in the source file.
For a list of all the options, run ‘texi2dvi --help’.
Next: Format with tex/texindex, Previous: Use TeX, Up: Hardcopy [Contents][Index]