5

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 ?

Norswap
  • 185
  • If you just want to place you figures where they are defined within your document, without them actually "floating" to somewhere else, consider using the H float specifier offered by the float package. However, it may be that you're after @lockstep's answer. – Werner Nov 14 '11 at 23:04

1 Answers1

8

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}
lockstep
  • 250,273
  • Nice ! But for some reason it does not work at all for tables, only for figures :/ – Norswap Nov 14 '11 at 23:36
  • @Norswap: Do you use just tabular or a similar environment? You have to enclose it into table (the floating environment) as well. – lockstep Nov 14 '11 at 23:41
  • Actually I fixed that, it's because I used \restylefloat{table} (a leftover from an old file). Anyway now the thing won't compile because it is stuck doing IO on .ttt (the table repository used by enfloat). .fff (for figures) is fine tough. I opened the file, and everything seemed to be there. Strange. – Norswap Nov 14 '11 at 23:44
  • @Norswap: When in doubt, delete all auxiliary files and try again. – lockstep Nov 14 '11 at 23:45
  • Already done, no improvements. – Norswap Nov 14 '11 at 23:50
  • @Norswap: It works for me if I replace "figure" with "table" in my example, so you must be doing something different. If you can't figure out what "something" is, boil your file down to a minimal example and ask a follow-up question. – lockstep Nov 14 '11 at 23:54
  • After restarting and reinserting \restylefloat{table}, everything now works correctly. I am dumbstruck but happy nonetheless. – Norswap Nov 15 '11 at 00:05
  • @Norswap: Sorry, I'm out of my depth. I hope you get it fixed. – lockstep Nov 15 '11 at 00:06