# [texhax] \listoffigures, order of reference numbers

Torsten Wagner torsten.wagner at fh-aachen.de
Thu Apr 20 18:32:51 CEST 2006

```Hello,

I just wonder about a little problem which a colleague of mine found
recently.
I wasn't able to determine whether this is a bug, a feature or just a
mistake from our side ;)
We used the command \listoffigures in the beginning of the document. For

If we refer now in a figure-caption to one of these references, one
should expect the reference-number according to the place where the
figure is placed.
However, since the "list of figures" is placed in front of all other
chapters with all these other references, LaTeX will start to allocate
the first reference numbers in the list of
figures resp. for the figure captions. Independent of there positions in
the text

Example:

List of figures
1 Figure-caption [1].....1

1 Chapter

Text with references [2-3].....

FIGURE

1.1 Figure-caption [1].

I know that attachments in mailing lists are not liked. However, I
attached a small zip-file which includes a minimal example. Since
several files are needed an attachment is maybe easier to reconstruct
the problem.

We figured out he following facts already.
It is not depending on a package (e.g. natbib, which was used in the
real document)
It seems to work correct with bibitems instead of a bib-file
It seems to work correct with the article class but not with report and book
All suggestions which we found in the Internet doesn't work
-- \caption[]{figure-text \cite{d}} I can not explain how this should
work ;)
-- \caption{figure-text \protect\cite{d}} because \cite is (was since
LaTeX 2e) fragile
It works (needless to say) if we place the \listoffigures command at the
end of the document.
The \biblographystyle has no influence to this phenomena.

Due to all this unlike facts, I hope that at the very end not we (the
authors) are the problem. ;)
On the other hand I can not believe that we are the first  with this
problem.
Nevertheless, the first one who can link to RTFM I owe a beer.

Thanks for help

Torsten
CC. Ah... yes MiKTeX-e-TeX 2.4.1986 (2.2) (MiKTeX 2.4) and MiKTeX-BibTeX