\HeaderA{SweaveSyntConv}{Convert Sweave Syntax}{SweaveSyntConv}
\keyword{utilities}{SweaveSyntConv}
\begin{Description}\relax
This function converts the syntax of files in \code{\LinkA{Sweave}{Sweave}}
format to another Sweave syntax definition.
\end{Description}
\begin{Usage}
\begin{verbatim}
SweaveSyntConv(file, syntax, output = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] Name of Sweave source file.
\item[\code{syntax}] An object of class \code{SweaveSyntax} or a character
string with its name giving the target syntax to which the file is
converted.
\item[\code{output}] Name of output file, default is to remove the extension
from the input file and to add the default extension of the target
syntax. Any directory names in \code{file} are also removed such
that the output is created in the current working directory.
\end{ldescription}
\end{Arguments}
\begin{Author}\relax
Friedrich Leisch
\end{Author}
\begin{References}\relax
Friedrich Leisch: Sweave User Manual, 2002\\
\url{http://www.ci.tuwien.ac.at/~leisch/Sweave}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{RweaveLatex}{RweaveLatex}}, \code{\LinkA{Rtangle}{Rtangle}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils")

## convert the file to latex syntax
SweaveSyntConv(testfile, SweaveSyntaxLatex)

## and run it through Sweave
Sweave("Sweave-test-1.Stex")


\end{ExampleCode}
\end{Examples}

