\HeaderA{texi2dvi}{Compile LaTeX Files}{texi2dvi}
\keyword{utilities}{texi2dvi}
\begin{Description}\relax
Run \code{latex} and \code{bibtex} until all cross-references are
resolved and create either a dvi or PDF file.
\end{Description}
\begin{Usage}
\begin{verbatim}
texi2dvi(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
         texi2dvi = getOption("texi2dvi"), texinputs = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] character.  Name of LaTeX source file.
\item[\code{pdf}] logical.  If \code{TRUE}, a PDF file is produced instead of
the default dvi file (\code{texi2dvi} command line option \option{--pdf}).
\item[\code{clean}] logical.  If \code{TRUE}, all auxiliary files are removed
(\code{texi2dvi} command line option \option{--clean}).  May not work on
some platforms.
\item[\code{quiet}] logical.  No output unless an error occurs.  Ignored if
emulation (see the \code{texi2dvi} argument) is used.
\item[\code{texi2dvi}] character (or \code{NULL}).  Script or program used to
compile a TeX file to dvi or PDF, respectively.
The default (selected by \code{""} or \code{NULL}) is to look for an
executable on the search path and otherwise emulate the script with
\code{system} calls.
\item[\code{texinputs}] \code{NULL} or a character vector of paths to add to
the LaTeX and bibtex input search paths.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Despite the name, this is used in \R{} to compile LaTeX files,
specifically those generated from vignettes.  It
ensures that the \file{\var{\LinkA{R\_HOME}{R.Rul.HOME}}/share/texmf} directory is
in the \env{TEXINPUTS} path, so \R{} style files such as \file{Sweave}
and \file{Rd} will be found.  The search path used is first the
existing \env{TEXINPUTS} setting (or the current directory if unset),
then elements of \code{texinputs}, then
\file{\var{R\_HOME}/share/texmf} and finally the default
path. Analogous changes are made to \env{BIBINPUTS} and
\env{BSTINPUTS}settings.
\end{Details}
\begin{Author}\relax
Achim Zeileis and R-core
\end{Author}

