[Tex/LaTex] Protect text from being interrupted by figures or tables

floatspositioning

I have read How to protect text from being split by a float? by it does not exactly cover what I want.

I have a text that is interspersed with figures. I do not wish to copy all the figures to the end of the document, but wish that they all appear there, leaving the text proper uninterrupted by them. Isn't there some environment that could do this for me ?

Best Answer

Have a look at the endfloat package. In the following example, I use the nomarkers package option to suppress place markers in the text and the nolists option to supress the creation of (here) a list of figures.

\documentclass{article}

\usepackage[nomarkers,nolists]{endfloat}

\begin{document}

\section{foo}

Some text.

\begin{figure}
\centering
\rule{1cm}{1cm}
\caption{A figure}
\end{figure}

\end{document}
Related Question