## Sunday, July 10, 2011

### Unsorted reference numbering when using a list of figures and a citation is in the caption

This is a dumb problem that has a little attention. I figured it out from

If you use the cite command in the a caption AND have a list of figures or list of tables generated, then the unsorted numbering will be wrong. It will start numbering the references from the list of figures and not from the start of the actual document. Therefore, the first reference in the body of the document will not start at 1. To fix, use the optional command syntax for \caption:

\caption[This is the caption]{This is the caption \cite{REF}}

Just repeat the caption in the brackets and omit the \cite command. You'll probably have to rerun Latex twice and maybe bibtex once before the changes are updated but it works! The article I linked to says you might have to use the \protect{\cite{REF}} command, but I didn't find it necessary.