BibTeX, biblatex and biberChoosing the optimum citation order

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Choosing the optimum citation order

Post by kaiserkarl13 »

When citing sources using numerical styles and the cite package or the natbib package with the sort&compress option, it is common to cite a bunch of references early in the document, then find another group later in the document that are disjoint, but don't have to be. For example, let's say I have two groups of references that look like this:

Code: Select all

I cited a bunch of people~\cite{Auth1,Auth2,Auth3,Auth4,Auth5,Auth6,Auth7,Auth8}
and another group later, too~\cite{Auth2,Auth3,Auth5,Auth6}.
which results in:
I cited a bunch of people [2-8] and another group later, too [2,3,5,6]
The above example could easily be reordered to

Code: Select all

I cited a bunch of people~\cite{Auth1,Auth2,Auth3,Auth5,Auth6,Auth4,Auth7,Auth8}
and another group later, too~\cite{Auth2,Auth3,Auth5,Auth6}.
which results in:
I cited a bunch of people [2-8] and another group later, too [2-5].
For this example it is relatively simple to do this by hand, but I have run across cases where I think I have figured out how best to reorder something, only to realize I'm wrong and get extremely frustrated trying to fix it because the citation in question is actually cited a lot earlier than I thought it was, and I'm not changing anything by editing the place I'm editing. As usual, I think to myself, "There must be a better way to do this" (and logically that means there already is...?)

Is anyone aware of any software that analyzes .aux or .tex files for such patterns and advises you on ways to reorder your citations to maximize grouping?

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply