[OS X TeX] How to comment out includegraphics?

Morten Høgholm morten.hoegholm at gmail.com
Wed Oct 26 01:21:25 CEST 2005


On Tue, 25 Oct 2005 18:08:57 -0500, Alain Schremmer  
<Schremmer.Alain at gmail.com> wrote:

> In Petersen's defense, I should say that he knows what my stuff looks  
> like and that the only \includegraphics I have, if very many of them,  
> are bare bones ones.

Ah, an insider  ;-)

> But, out of curiosity, I will try the  \fbox{\includegraphics{myfile}}.  
> Does the \includegraphics explode with much sparks or does it just burn  
> slowly?

The problem is that the substitution will then be
   \fbox{%\includegraphics{myfile}}
and then TeX will just see if it can find some } token to end the \fbox.  
Assuming the rest of the file is free of syntax error, you will probably  
wind up with an error such as

Runaway argument?
{\par Hello World! \par \stop \documentclass [a4paper]{article}  
\usepackage \ET
C.
! File ended while scanning use of \fbox.
<inserted text>
                 \par
<*> Outlines.tex


Another problem is that some users make use of the fact that you can split  
keyval argument over several lines. Hence
   \includegraphics[
     width=5cm,
     height=3cm
   ]{myfile}
is valid as well and that will just typeset
       width=5cm, height=3cm ]myfile
in the middle of your document with that search and replace.
-- 
Morten
------------------------- 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 macostex-archives mailing list