[R] setkeys and Sweave
Friedrich.Leisch@tuwien.ac.at
Friedrich.Leisch at tuwien.ac.at
Fri Sep 16 14:22:51 CEST 2005
>>>>> On Fri, 16 Sep 2005 10:38:51 +0200,
>>>>> Christian Hoffmann (CH) wrote:
> Hi there:
> Using
> \setkeys{Gin}{width=1.0\textwidth}
> \setkeys{Gin}{height=10cm}
> \setkeys{Gin}{height=0.8\textwidth}
> all seem to work under R-2.1.1 under sparc, solaris2.9, but
> \setkeys{Gin}{scale=0.3}
> \setkeys{Gin}{angle=90}
> do not work. I have not been able to find relevant information, googling
> on setkeys proved confusing, at best.
> http://cnlart.web.cern.ch/cnlart/218/node85.html states:
> ---
> Setting key values globally
> If you want to specify a global value for a set of keys, then you can
> use the \setkeys command defined in the keyval package (described below).
> As an example let us consider the case where you would like your figure
> to be scaled to the width of the line. Then you could specify the following:
> \setkeys{Gin}{width=\linewidth}
> The first argument Gin of the \setkeys command refers to the
> \includegraphics command. The result will be that all images include
> with this command (when the graphicx is loaded) will be set to the
> desired width inside the current group or environment.
> In the similar way one could specify any of the possible arguments of
> the \rotatebox command by using the Grot specifier, e.g.,
> \setkeys{Grot}{origin=tc}
> ---
> Question:
> Which variants of \setkeys are there? Is there a list stating these?
That's not really an R question, but a LaTeX question. Maybe you have
more luck on a LaTeX list. I always use the grfguide.ps manual that
comes with the graphics package (at least on my Debian Luinux box) as
reference, or the LaTeX companion.
> Can several \setkeys{of the same sort} be used inside one document?
Yes, I regularly do that. Every \setkeys{} sets the value from the
point in the LaTeX document where it appears, i.e.,
\setkeys{Gin}{width=1.0\textwidth}
<<fig1>>
\setkeys{Gin}{width=0.5\textwidth}
<<fig2>>
does the expected.
--
-------------------------------------------------------------------
Friedrich Leisch
Institut für Statistik Tel: (+43 1) 58801 10715
Technische Universität Wien Fax: (+43 1) 58801 10798
Wiedner Hauptstraße 8-10/1071
A-1040 Wien, Austria http://www.ci.tuwien.ac.at/~leisch
More information about the R-help
mailing list