is there a way to enumerate figures in the order they actually appear in the document, and not in the order they were declared in the source file?
I have the following source:
\documentclass{article}
\usepackage{float}
\begin{document}
TEXT1
\begin{figure}[p]
\caption{Figur A}
\end{figure}
TEXT2
\begin{figure}[H]
\caption{Figur B}
\end{figure}
TEXT3
\end{document}
which yields the following two pages:
TEXT1
TEXT2
+++++++++++++++
+ +
+ FIGUR B +
+ +
+++++++++++++++
Fig 2: Figur B
TEXT3
---new page---
+++++++++++++++
+ +
+ FIGUR A +
+ +
+++++++++++++++
Fig 1: Figur A
So, how these two figures appear is exactly what I want, but it is really bad that in the output document, figure 2 comes before figure 1. This is also ugly in the table of figures:
Fig 2 "Figur B" page 1
Fig 1 "Figur A" page 2
What I want is, that iff tex decides to put figure B after figure A, then it should give figure B the number 1 and figure A the number 2.
I know there are some dirty hacks (setcounter; move figures in source), but obviously I'd like to have an elegant solution.
Thanks!
\documentclass
up to\end{document}
. And if you're using[H]
instead of[h]
, then it's well explained in the documentation offloat
that[H]
can make the numbering of floats out of order.[H]
specifier is clearly explained in the manual.H
placement specifier can be utterly counterproductive. For sure, if you replaceH
withht!
, "Figur B" will be placed after, not before, "Figur A".[H]
regardless, that you know, that its use leads to your problem, than go ahead and add\clearpage
before\begin{figure}[H]
.