[R] Sweave, Xfig, pdflatex and \setkeys

Friedrich Leisch friedrich.leisch at stat.uni-muenchen.de
Thu Dec 14 12:16:31 CET 2006


>>>>> On Wed, 13 Dec 2006 12:38:04 +0100,
>>>>> David Lindelöf (DL) wrote:

  > On Tue, 2006-12-12 at 13:22 -0500, Kevin E. Thorpe wrote:
  >> > Trouble is that Sweave defines (with \setkeys) the default width of
  >> > \includegraphics to be 0.8 times the \textwidth. The result is that the
  >> > graphic is scaled, but not the text.
  >> > 
  >> > I was looking for a way to temporarily undefine the default width of
  >> > included graphics, but without success. Does anyone know how to undo a
  >> > definition that has been set with \setkeys?

  >> If you knew what setting you needed, you could try
  >> 
  >> \setkeys{Gin}{width=whatever}
  >> 
  >> before your include, and set it back to the default afterward with
  >> 
  >> \setkeys{Gin}{width=0.8\textwidth}

  > Yes, but the trouble is that for arbitrary figures created with Xfig I
  > cannot know what the correct width is going to be. And I could not find
  > any help on how to undefine variables set with \setkeys.

Yes, I should document Sweave.sty much better ...

  \usepackage[nogin]{Sweave}

in your .Rnw file will do the trick, i.e., not set any Gin keys.

HTH,
Fritz

-- 
-----------------------------------------------------------------------
Prof. Dr. Friedrich Leisch 

Institut für Statistik                          Tel: (+49 89) 2180 3165
Ludwig-Maximilians-Universität                  Fax: (+49 89) 2180 5308
Ludwigstraße 33
D-80539 München                 http://www.stat.uni-muenchen.de/~leisch



More information about the R-help mailing list