Info Node: (texinfo)Format with texi2dvi
texinfo: Format with texi2dvi
Hardcopy Print with lpr Format with tex/texindex Back to Software Index
21.3 Format with 'texi2dvi'
===========================
The 'texi2dvi' command automatically runs both TeX and 'texindex' as
many times as necessary to produce a DVI file with sorted indices and
all cross references resolved. It is therefore simpler than manually
executing the 'tex'--'texindex'--'tex'--'tex' sequence described in the
previous section.
To run 'texi2dvi' on an input file 'foo.texi', do this (where 'prompt$
' is your shell prompt):
prompt$ texi2dvi foo.texi
As shown in this example, the input filenames to 'texi2dvi' must
include any extension ('.texi', '.texinfo', etc.). 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' (Note: @smallbook),
'@afourpaper' (Note: A4 Paper), or '@pagesizes' (Note: @pagesizes),
without actually changing the document source. (You can also do this on
a site-wide basis with 'texinfo.cnf'; Note: Preparing for TeX).
With the '--pdf' option, 'texi2dvi' produces PDF output instead of DVI
(Note: PDF Output), by running 'pdftex' instead of 'tex'.
Alternatively, the command 'texi2pdf' is an abbreviation for running
'texi2dvi --pdf'. The command 'pdftexi2dvi' is also supported as a
convenience to AUC-TeX users (Note: (auctex)Top, since that program
merely prepends '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 extant among 'dvipdfmx',
'dvipdfm', 'dvipdf', 'dvi2pdf', 'dvitopdf'. This method can support CJK
typesetting better than 'pdftex'.
With the '--ps' option, 'texi2dvi' produces PostScript instead of DVI,
by running 'tex' and then 'dvips' (Note: (dvips)Top). (Or the value
of the 'DVIPS' environment variable, if set.)
'texi2dvi' can also be used to process LaTeX files; simply run
'texi2dvi filename.ext'.
Normally 'texi2dvi' is able to guess the input file language by its
contents and file name suffix. If, however, it fails to do so you can
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; these
extended versions of TeX are not required, and the DVI (or PDF) output
is identical, but they simplify the TeX programming in some cases, and
provide additional tracing information when debugging 'texinfo.tex'.
Several options are provided for handling documents, written in
character sets other than ASCII. The '--translate-file=FILE' option
instructs 'texi2dvi' to translate input into internal TeX character set
using "translation file" FILE (Note: TCX files.).
The options '--recode' and '--recode-from=ENC' allow conversion of an
input document before running TeX. The '--recode' option recodes the
document from encoding specified by '@documentencoding' command (Note:
@documentencoding) to plain 7-bit 'texinfo' encoding.
The option '--recode-from=ENC' recodes the document from ENC encoding
to the encoding specified by '@documentencoding'. This is useful, for
example, if the document is written in 'UTF-8' encoding and an
equivalent 8-bit encoding is supported by 'makeinfo'.
Both '--recode' and '--recode-from=ENC' use 'recode' utility to
perform the conversion. If 'recode' fails to process the file,
'texi2dvi' prints a warning and continues, using the unmodified input
file.
The option '-E' (equivalently, '-e' and '--expand') does Texinfo macro
expansion using 'makeinfo' instead of the TeX implementation (Note:
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 the list of all options, run 'texi2dvi --help'.
automatically generated by info2www version 1.2