BibTeX, biblatex and biberCorrect numbering of refs within figures

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
colmatrix
Posts: 6
Joined: Tue Oct 27, 2009 11:57 pm

Correct numbering of refs within figures

Post by colmatrix »

Hi,

The problem I'm having at the moment is that the numbering of my references is being thrown off by the fact that I have placed some citations within figures. For example, I have:

blah blah blah, \cite{ref A}.

\begin{figure}
........
\caption{Figure caption, from \cite{ref B}}
\end{figure}

blah blah blah, \cite{ref C}

I would like the references to be numbered in the order they appear in the final document, so in the example I would want above A to be numbered #1, B=2, etc. However, what I actually get is that the reference contained within the figure is labeled first, then the other references. So I would get B=1, A=2, C=3 in the above example. That way, when you read the compiled document, reference 2 appears before refernece 1... :cry:

I'm using the natbib bibliography style, formatted with unsrtnat.

Does anyone have any ideas on how I can sort this? Thanks in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

colmatrix
Posts: 6
Joined: Tue Oct 27, 2009 11:57 pm

Re: Correct numbering of refs within figures

Post by colmatrix »

I've actually (kind of) sorted it. The problem was that there was a list of figures before the main document. This meant that, technically, references contained within figure captions appeared at the start of the document, which threw the numbering off. By removing the list of figures all the references are back in the correct order.

I could put the list of figures at after the main document, to keep the numbering correct, and then simply move the printed page to the start afterwards......unless anyone has a more elegant LaTeX based solution? ;)
magicmoose
Posts: 90
Joined: Fri Nov 06, 2009 7:29 am

Correct numbering of refs within figures

Post by magicmoose »

Try using

Code: Select all

\caption[short caption for LoF/LoT]{Full caption with reference}
colmatrix
Posts: 6
Joined: Tue Oct 27, 2009 11:57 pm

Re: Correct numbering of refs within figures

Post by colmatrix »

That worked a treat. Thanks for your help! :)
Post Reply