9

A minimal example using the endfloat package fails to compile. Before filing a bug report with the maintainer, please, could you take a look if I'm using it correctly? Perhaps you know a workaround?

\documentclass{article}
\pagestyle{empty}

\usepackage{endfloat}

\begin{document}
  \section{Test}
  \begin{table}
    \begin{tabular}{c}
    123 \\
    \end{tabular}
    \caption{Test}
  \end{table}
  Test
  \processdelayedfloats
\end{document}

The error I'm seeing is:

(./texput.aux) (texput.ttt))
Runaway argument?
! File ended while scanning use of \efloat@xfloat.
<inserted text> 
                \par 
<*> texput.tex

? 

I'm on Ubuntu, current TeXlive.

18

Not sure it's documented (didn't look:-) but due to the way the package scans for the environment

\end{table}

needs to be on its own at the start of the line so delete the spaces before it in your example.


This is documented in the endfloat manual

10.1 Literal strings

When floats are being read, LATEX is in verbatim mode. Among other things, this means that the lines like

\end{figure}

must appear on lines by themselves without any whitespace before or after them. A complete reimplementation of the most difficult part of the package is required to fix this limitation, but it is among the distant goals I have.

  • Sometimes things are so simple... Thank you. – krlmlr Jul 5 '12 at 12:37
  • I wasted about 5 hrs this morning trying to get an APA style document to print properly using "man" and "floatsintext" as options. This worked find in "jou" mode just not at all in "man" with or without "floatsintext". No idea how this is related to "endfloat". But thanks! – Wayne Oct 3 '15 at 17:21
1

I just wanted to add that the endfloat package is extremely fragile when it comes to reading float delimiters. I had this error because sometime I terminated \end{float} statements with a percent sign.

I don't know if it is possible to use regular expressions in LaTex to fix the problem but at least a warning should be given in the documentation.

In case you run in the same problem, a tip for debugging: after the error you will need to kill the compiler, then delete the .aux file. On the next recompile look at the last latex warning of reference not found, the offending float is the one next to that reference in the code. Good luck.

  • Since endfloat v2.6 it is allowed to have a percent sign at the end of the floating environment, e.g.: \end{figure}%. – Axel Sommerfeldt Nov 30 '18 at 6:42

protected by user36296 Mar 27 '18 at 16:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.