Skip to content
Prev 106112 / 398506 Next

Sweave, Xfig, pdflatex and \setkeys


        
> 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