[OS X TeX] How to comment out includegraphics?

Ross Moore ross at ics.mq.edu.au
Thu Oct 27 22:01:10 EDT 2005


Hi Herb, Morten, and others.

On 28/10/2005, at 9:16 AM, Herbert Schulz wrote:

> On Oct 27, 2005, at 5:47 PM, Morten Høgholm wrote:
>> The problem here is that with the redefinition of  
>> \includegraphics, the underscore is all of sudden just used for  
>> regular typesetting and it promptly asked to be put in math mode.

> Wow, I never thought of that! I guess the only safe redefinition is  
> to not use either of the arguments and just use some kind of marker.

No, it's easier than that
  --- without resorting to LaTeX internals.

You want to make \includegraphics behave like a macro that
you know already handles filenames correctly, such as \url
from  \usepackage{url} .

You must do it in a way that does *not* read the {...} argument
until the catcodes of the special characters have been adapted.

e.g.
  \renewcommand{\includegraphics}[1][]{\url}

Now the optional argument is gobbled, then the \url  picks up the
filename and prints it in whatever style you use for URLs.


Even better would be to look at how  url.sty  can be customised,
and setup a special command to deal just with these filenames
for graphics --- using a special font and/or color.


>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest.com)

Hope this helps,

     Ross

>
>
> ------------------------- Info --------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>          & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
>
>
>

------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list