\HeaderA{RdUtils}{Utilities for Processing Rd Files}{RdUtils}
\aliasA{Rd2dvi}{RdUtils}{Rd2dvi}
\aliasA{Rd2txt}{RdUtils}{Rd2txt}
\aliasA{Rdconv}{RdUtils}{Rdconv}
\aliasA{Sd2Rd}{RdUtils}{Sd2Rd}
\keyword{utilities}{RdUtils}
\begin{Description}\relax
Utilities for converting files in R documentation (Rd) format to other
formats or create indices from them, and for converting documentation
in other formats to Rd format.
\end{Description}
\begin{Usage}
\begin{verbatim}

R CMD Rdconv [options] file
R CMD Rd2dvi [options] files
R CMD Rd2txt [options] file
R CMD Sd2Rd [options] file
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] the path to a file to be processed.
\item[\code{files}] a list of file names specifying the R documentation
sources to use, by either giving the paths to the files, or the path
to a directory with the sources of a package.
\item[\code{options}] further options to control the processing, or for
obtaining information about usage and version of the utility.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{Rdconv} converts Rd format to other formats.  Currently,
plain text, HTML, LaTeX, S version 3 (Sd), and S version 4 (.sgml)
formats are supported.  It can also extract the examples for
run-time testing.

\code{Rd2dvi} and \code{Rd2txt} are user-level programs
for producing DVI/PDF output or pretty text output from Rd sources.
\code{Rd2dvi} will make use of environment variables
\env{R\_PAPERSIZE} (set by \code{R CMD}, with a default set when \R{} was
installed) and \env{xdvi} (the DVI previewer, default \code{xdvi}),
and \env{R\_PDFVIEWER} (the PDF previwer).  (Valid values for
\env{R\_PAPERSIZE} are \code{a4}, \code{letter}, \code{legal} and
\code{executive}.)

\code{Sd2Rd} converts S (version 3 or 4) documentation formats to Rd
format.

Use
\code{R CMD foo --help}
to obtain usage information on utility \code{foo}.
\end{Details}
\begin{Note}\relax
Conversion to S version 3/4 formats is rough: there are some
\file{.Rd} constructs for which there is no natural analogue.
They are intended as a starting point for hand-tuning.
\end{Note}
\begin{SeeAlso}\relax
The chapter \dQuote{Processing Rd format} in the \dQuote{Writing \R{}
Extensions} manual.
\end{SeeAlso}

