[Rd] Sweave processes comments incorrectly (PR#9073)
krc at mdacc.tmc.edu
krc at mdacc.tmc.edu
Tue Jul 11 16:46:02 CEST 2006
Full_Name: Kevin R. Coombes
Version: 2.1.0
OS: Windows XP
Submission from: (NULL) (143.111.22.24)
I have a source file "devel.Rnw" that uses the LaTeX foils class and ppower4 to
produce a PDF presentation file. It starts with a commented note to myself as
follows:
%%%% begin source example %%%%
%
% Remember to update the hypersetup to include individual lecture
% titles, change the leftheader to include the lecture title, and
% then start at \begin{document} ....
% Also, produce a printable (black and white version) according
% to the cues immediately following \begin{document}.
% Compile this document with:
% pdflatex <filename>.tex
% and then:
% ppower4pb <filename>.pdf <filename>.pdf
%
\documentclass[Screen4to3,25pt,headrule,footrule]{foils}
\usepackage[pdftex]{color} %for colors
\definecolor{Teal}{rgb}{0.0,0.47,0.46}
%% more colors and packages omitted from bug report
\begin{document}
\hypersetup{pdfpagetransition=Replace}
%%%% end source example %%%%
When processed using Sweave, the \begin{document} comments are expanded to
actual LaTeX commands, causing a later latex to fail. That is, the output of
running Sweave() on this file begins:
%%%% begin source example %%%%
%
% Remember to update the hypersetup to include individual lecture
% titles, change the leftheader to include the lecture title, and
% then start at \usepackage{c:/R/rw2010/share/texmf/Sweave}
\begin{document} ....
% Also, produce a printable (black and white version) according
% to the cues immediately following
\usepackage{c:/R/rw2010/share/texmf/Sweave}
\begin{document}.
% Compile this document with:
% pdflatex <filename>.tex
% and then:
% ppower4pb <filename>.pdf <filename>.pdf
\documentclass[Screen4to3,25pt,headrule,footrule]{foils}
\usepackage[pdftex]{color} %for colors
More information about the R-devel
mailing list