[R] Sweave documents have corrupted double quotes

Duncan Murdoch murdoch at stats.uwo.ca
Sat Jan 17 21:57:20 CET 2009


On 17/01/2009 3:15 PM, Paul Johnson wrote:
> Hey, everybody.
> 
> I am concluding that this Sweave wrecks quotation marks in typewriter
> font is a bug in Sweave.

I think you're being unfair:  this is a LaTeX bug, not an Sweave bug. 
See below.

> I've uploaded the foo.tex file so now you can see the Rnw, tex, and
> pdf file side by side.
> 
> http://pj.freefaculty.org/latex
> 
> As previous poster noted, the Sweave instruction is added at the end
> of the preamble in foo.tex. However, moving the \usepackage{Sweave} to
> the beginning of the preamble has no effect. Same black boxes.
> 
> It is true that one can work around this by inserting the declaration
> 
> \usepackage[noae]Sweave
> 
> into the Rnw file (or in the tex file).  That solves the problem,
> however, the user is left with a suspicious feeling.  What will go
> wrong in my output after [noae] is inserted? If nothing, why was it
> there in the first place?

R is open source, so this is no mystery:  if you use [noae] then Sweave 
won't use the ae package in LaTeX.  The problem you were having with 
quotes is that the ae package doesn't define those.  If you choose not 
to use it, then you won't get the symbols that it does define.

Duncan Murdoch




More information about the R-help mailing list