[R] Sweave, Xfig, pdflatex and \setkeys

David Lindelöf david.lindelof at epfl.ch
Tue Dec 12 11:37:53 CET 2006


Dear useRs,

How does one include graphics created with Xfig with LaTeX fonts into
Sweave?

If I create a graphic with Xfig with some Computer Modern fonts, I
choose to export it as combined PDF and LaTeX. So I get two files, one
foo.pdf with the drawings without the text and foo.pdftex with some
LaTeX code that ensures the text lands in the right place together with
the drawing. I'm supposed to \input{} this file in my LaTeX document.

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?

Or does anyone has another workaround for including xfig graphics with
LaTeX text in Sweave?

Looking forward to your help,
--
--------------------------------------------------
David Lindelöf
Station 18
LESO-PB/EPFL
1015 Lausanne
tel +41-21-693.5556
mob +41-79-415.6641
fax +41-21-693.2722
e-mail david.lindelof at epfl.ch
url http://lesowww.epfl.ch/doctorants/lindelof/
weblog http://visnet.ch/~lindelof/smartbuildings/
--------------------------------------------------

In the force if Yoda's so strong, construct a sentence with words in
the proper order then why can't he?




More information about the R-help mailing list