[R] Sweave and LaTeX beamer class -- SOLVED!
Bernd Weiss
bernd.weiss at uni-koeln.de
Mon Dec 20 09:33:23 CET 2004
On 20 Dec 2004 at 7:11, Bernd Weiss wrote:
> Hi,
>
> has anyonne experienced problems between the LaTeX beamer class and
> Sweave? The following code does not work properly:
> ################################# \documentclass{beamer}
>
> \usepackage[latin1]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{ngerman}
>
> \begin{document}
> \frame{
> \frametitle{test}
> test
> <<>>=
> 1+1
> @
> }
> \end{document}
> #################################
The following code works as expected!
It is important to use a frame-environment and the "fragile"-option.
\begin{frame}[fragile]
...
\end{frame}
##################################
\documentclass{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ngerman}
\begin{document}
\begin{frame}[fragile]
\frametitle{test}
test
<<>>=
1+1
@
\end{frame}
\end{document}
####################################
More information about the R-help
mailing list