3

I'm trying to compile a draft of my .tex document, leaving out all the figures. The answer given here, ie:

\usepackage{comment}
\excludecomment{figure}
\let\endfigure\relax

works for images included in a \begin{figure} block, but not for a \begin{figure*} one.

I tried adding a \excludecomment{figure*} line to the above block, but I get an error:

Extra }, or forgotten \endgroup. [\end{figure*}]

How can I exclude all images from the final PDF?

1 Answer 1

3

I believe that this should work, but it's untested (you have not provided a minimal (non-)working example; if it does not work, let me know and I'll delete the answer; or, provide a MWE):

\usepackage{comment}
\excludecomment{figure}
\let\endfigure\relax
\expandafter\let\csname figure*\endcsname\figure
\expandafter\let\csname endfigure*\endcsname\endfigure

The problem is that you can't work with names containing * out of the box. This is a "hack" to make the figure* environment do exactly the same as figure.

1
  • 1
    Works perfectly yo', thank you very much! (Sorry for not posting a MWE, will try not to be so lazy next time)
    – Gabriel
    Feb 23, 2016 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .