Here's the problem.

I have the main text of a document which includes a citation late in the document, say \cite{ref20}.

One of my figure captions has in it, the \cite{ref20}. What happens is that the number given to ref20 is now entirely dependent upon the location of the figure in the document.

What I want is the numbering to be the same regardless of the position of the figure, so that a version with all figures grouped at the end has the same numbering.

Any ideas?

  • 1
    Although I can't test this myself at the moment, how about adding \nocite{ref20} outside (say, before) the figure environment? – Werner Feb 14 '12 at 16:50
  • You don't seem to be constrained in the way your references are sorted. Can you simply use alphabetic sorting of the references? That should take care of it. – Michael Palmer Feb 14 '12 at 20:02

If the BibTeX style orders the citations by first appearance then what you have to ensure is that this first appearance is in the order you want. In theory this could be done by using \nocite, but in the worst possible scenario that means that you have to put \nocitedeclarations for all cites in the right order into the preamble . So that is most likely not a good option.

As an alternative you could ensure that a certain cite is simply not seen by BibTeX, in other words does not produce an entry in the .aux file. Of course that only works if that cite is at least once cited in a regular way somewhere in the document, but according to your problem that is the case.

So here is the code to do just that:


         #1%                     % do \cite comand


In the argument of \ignorecitefornumbering you place the citation command you want to use. Of course you could change that to even include the \cite command internally, but then you either need to take care of the optional argument or have non available. Also in that case alternate citation commands (from natbib, for example) wouldn't work. So I guess the above is actually the better approach.

If you run this, then your .aux file will contain


i.e., the first reference to bar does not show up.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.