I am editing a book and it has quite a lot of figures....I believe this is the reason why it takes long to compile.
I have to do some editing in the text, so I do not need it to load the figures for now...is there a way to do a lean compiling?
The memoir class can be loaded with the option draft. It also provides the macro \ifdraftdoc, which executes different code depending on whether you are in draft mode or not. You could write a macro making use of this to insert your figures, something along the lines of
\newcommand{\insertfigure}[1]{%
\ifdraftdoc
\fbox{Placeholder for figure #1}%
\else
\includegraphicx{#1}%
\fi%
}
Concerning \includegraphics: Either use the draft class or graphicx package option or drop the action of \includegraphics into litter bin such that it does nothing.
The \foreach loop is just use to 'blow' up the document's size and compilation time.
\documentclass{memoir}% or \documentclass[draft]{memoir}
\usepackage{graphicx}%
\usepackage{pgffor}
\newif\ifdropfigures % At the time of definition it is false!
\dropfigurestrue % yes, we drop figures
%\dropfiguresfalse
\ifdropfigures
\renewcommand{\includegraphics}[2][]{%
}% Ok, `\includegraphics does nothing any longer
\fi
\begin{document}
This is the output:
\foreach \x in {1,...,1000} {% 1000 times doing nothing.
\includegraphics[scale=0.2]{ente}
}
\end{document}
\includegraphicsto do nothing at all – May 31 '16 at 16:02\includeonlyin general for large documents. – Thomas May 31 '16 at 16:08\includegraphics, or are some of them built within the job (e.g. withtikzcode)? if the latter, things become a little more complicated, and we need a compilable example to figure out what might work best. – barbara beeton May 31 '16 at 16:09\includegraphics.– Adriano May 31 '16 at 16:33