Compile LaTeX Files
until all cross-references are resolved to create a dvi or a PDF file.
texi2dvi(file, pdf = FALSE, clean = FALSE, quiet = TRUE, texi2dvi = getOption("texi2dvi"), texinputs = NULL, index = TRUE)
texi2pdf(file, clean = FALSE, quiet = TRUE, texi2dvi = getOption("texi2dvi"), texinputs = NULL, index = TRUE)
- character string. Name of the LaTeX source file.
- logical. If
TRUE, a PDF file is produced instead of the default dvi file (
texi2dvicommand line option ).
- logical. If
TRUE, all auxiliary files created during the conversion are removed.
- logical. No output unless an error occurs.
- character string (or
NULL). Script or program used to compile a TeX file to dvi or PDF. The default (selected by
NULL) is to look for a program or script named
texi2dvion the path and otherwise emulate the script with
system2calls (which can be selected by the value
"emulation"). See also
NULLor a character vector of paths to add to the LaTeX and bibtex input search paths.
- logical: should indices be prepared?
texi2pdf is a wrapper for the common case of
texi2dvi(pdf = TRUE).
Despite the name, this is used in Rto compile LaTeX files,
specifically those generated from vignettes and by the
Rd2pdf script (used for package reference manuals). It
ensures that the
The default option for
texi2dvi is set from environment variable
On Windows the option
"texi2dvi" is normally unset. The MiKTeX
and is tried as from R3.2.3 if the argument is blank or
and a program or script
texi2dvi is not found.
MiKTeX had a
texi2dvi executable until Sept 2015, but no other
Windows TeX installation that we know of does, so emulation is used on
Occasionally indices contain special characters which cause indexing
to fail (particularly when using the hyperref LaTeX package)
even on valid input. The argument
index = FALSE is provided to
allow package manuals to be made when this happens: it uses emulation.
NULL. Used for the side effect of creating a dvi or PDF file in the current working directory (and maybe other files, especially if
clean = FALSE).
There are various versions of the One that was present with The three possible approaches all have their quirks. For example the
supplied by OS X) is that it will not work correctly for paths which
contain spaces, nor if the absolute path to a file would contain
texi2dvi script removes ancillary files that already
exist but the other two approaches do not (and may get confused by
Where supported (
quiet = TRUE from R3.2.3 only.
clean = TRUE only cleans up in this mode if the
conversion was successful---this gives users a chance to examine log
files in the event of error.
All the approaches should respect the values of environment variables
One that was present with
The three possible approaches all have their quirks. For example the