GeneralOrder bibliography by date

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
bramp
Posts: 10
Joined: Mon Aug 25, 2008 5:33 pm

Order bibliography by date

Post by bramp »

Hi,
I'm looking for a style which will order my bibliography by date. I'm writing my thesis, and at the beginning I have a list of papers I've written. I'm using \bibliography{blah} to list them, but I would prefer a way to list them in date order. If this is not possible, then is there a style which lists them in the order they appear in the .bib file?

thanks
Andrew

Recommended reading 2024:

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

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

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Order bibliography by date

Post by Juanjo »

I don't know any style which orders references by year or position in the bib file. However, the unsrt style follows the order of citation in the document. You can use this fact to achive your goal: anywhere in your document, before the first \cite command, write a series of \nocite commands in the order you would like. For example, if your bib file contains entries labeled book2007, paper2005 and paper2003, you should write:

Code: Select all

(initial stuff)
\nocite{paper2003}\nocite{paper2005}\nocite{book2007}
(more stuff)
In my book \cite{paper2003},... (remaining \cite commands)
(more stuff)
\bibliographystyle{unsrt}
\bibliography{mybibfile}
(final stuff)
Remember that \nocite produces no output. It only influences the way the bibliography is generated.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
bramp
Posts: 10
Joined: Mon Aug 25, 2008 5:33 pm

Order bibliography by date

Post by bramp »

That is a awesome tip!

It has worked like a treat.

I was able to shorten it by combining the nocite commands to this:

Code: Select all

\nocite{brampton2007cui,brampton2008cew,macquire2008acf}
\bibliographystyle{unsrt}
\bibliography{related}
I should have mentioned I wasn't actually citing my publications, I was just producing a list.

Oh, and while testing this I found out that if I didn't cite any of them, used \nocite{*), and the unsrt style, then it will be sorted in the order within the bib file.

Thanks
Post Reply