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!
\documentclassup to\end{document}. And if you're using[H]instead of[h], then it's well explained in the documentation offloatthat[H]can make the numbering of floats out of order. – egreg Feb 20 '18 at 09:47[H]specifier is clearly explained in the manual. – egreg Feb 21 '18 at 10:27Hplacement specifier can be utterly counterproductive. For sure, if you replaceHwithht!, "Figur B" will be placed after, not before, "Figur A". – Mico Feb 21 '18 at 10:27[H]regardless, that you know, that its use leads to your problem, than go ahead and add\clearpagebefore\begin{figure}[H]. – Zarko Feb 21 '18 at 11:57