[Tex/LaTex] How to set the options for the endfloat package, when you have to put several packages together in one usepackage{…}


I tried something like this: Move tables to appendix
to move tables and figures to the appendix.

However, longtables remain before the appendix. I solved this, following the manual ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/endfloat/endfloat.pdf

But now, I always get an error, if I try to use options for end float, in my case [nomarkers,nolists].

Any idea on how to solve this?

Currently, I get errors with all order of packages.




and so on.

I really would like to know what to do about this.

I did not provide an MWE, as the problem is basically the error message, that LaTeX thinks [nomarkers,nolists] is an option to anything else than end float!

Best Answer

What happens is that the tables are written to a file, and then at the end this file is \input and processed normally. Now your tables are floating, but longtable is not floating. Because you have [tb] as position specifier on your tables, these float to the top or the bottom of the page, so they can move across the longtable. If you want to preserve the order you can \usepackage{float} and give your tables the [H] specifier. Then the order will be preserved.

And as others have observed, put the other packages out of the [nomarkers,nolists] options. And the line \DeclareDelayedFloatFlavour{booktabs}{table} does not make sense, as booktabs is not an environment.

Here is a complete example.

\renewcommand{\efloatseparator}{\mbox{}} % allows tables to share a page

\chapter{A chapter}

As shown in Tables~\ref{tab:one} and \ref{tab:another}, we have two variables.
A & B \\
1 & 2 \\
3 & 4
\caption{\label{tab:one} A Table}

long & table \\
5 & 6 \\
7 & 8 \\
\caption{\label{tab:another} A Long Table}

C & D \\
5 & 6 \\
7 & 8
\caption{\label{tab:another} A Second Table}

\chapter{An appendix}


Related Question