I'm trying to generate a pdf file without the pictures for draft revision, and as seen here and here the \excludecomment{}
is not working for me.
Here is my error:
line 31: Extra }, or forgotten \endgroup \end{wrapfigure}
line 31: Undefined control sequence \end{wrapfigure}
line 31: Missing number, treated as zero \end{wrapfigure}
line 31: Illegal unit of measure (pt inserted) \end{wrapfigure}
given by my test code:
\documentclass[letterpaper]{article}
\usepackage[hmargin=2.5cm,vmargin=3.0cm]{geometry}
\linespread{1.3} % use 1.5 line spacing
\usepackage[pdftex]{graphicx}
\usepackage{wrapfig} % puts the figure wrapped
\newif\ifshow
%\showtrue
\showfalse
\usepackage{comment}
%\excludecomment{itemize}
\ifshow
\includecomment{wrapfigure}
\else
\excludecomment{wrapfigure}
\fi
\excludecomment{wrapfigure}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tempus convallis euismod. Vestibulum aliquet lacus at diam laoreet a scelerisque purus posuere.
\begin{wrapfigure}{r}{0.5\textwidth}
\begin{center}
\includegraphics[width=0.4\textwidth]{latex.png}
\end{center}
\caption{Caption}
\label{fig:00}
\end{wrapfigure}
\end{document}
Neither using the \removecomment{}
or the if
sentence works.
Best Answer
Package
version
Package
comment
The environment is an outer shell with its contents is set or is not depending on
\excludeversion
or\includeversion
. Also the environment markers have to be on a line of their own.\excludeversion
and\includeversion
do not work well with existing environments.\endwrapfigure
causes the error messages. Thus an additional wrapper environment is needed: