[OS X TeX] Error with graphicx/keyval

Chris Goedde cgg.lists at gmail.com
Fri Aug 13 23:36:27 CEST 2010


On Aug 13, 2010, at 4:18 PM, Manfred Braun wrote:

> Apparently the optional argument \Size is not expanded before it is passed to keyval. One possibility is to write
> 
>  \expandafter\includegraphics\expandafter[\Size]{testfig}
> 
> (The first \expandafter jumps over the command \includegraphics, the second over the opening bracket, then the parameter \Size is expanded.)
> Of course one can define a macro
> 
>  \newcommand\Includegraphics{\expandafter\includegraphics\expandafter}
> 
> which does the expected job, i.e.,
> 
>  \Includegraphics[\Size]{testfig}
> 
> The solution might be not very elegant, but it works.

Thanks! I figured it had something to do with expanding the macro, but that was as far as I got. I had played around unsuccessfully with \expandafter; since this all lives in a style file, it's plenty elegant for me.

Chris




More information about the macostex-archives mailing list