159

I'm facing a problem with biblatex citation order.

Using this configuration:

\documentclass {article}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\hyphenation{es-ta-bi-li-da-de}
\usepackage{setspace}
\singlespacing
\usepackage[natbib=true,style=numeric]{biblatex}
\addbibresource{frameworks.bib}

Being frameworks.bib this:

@Article{JONHSON88,
author = {Ralph Johnson, Brian Foote},
title = {Designin Reusable Classes},
journal = {Journal of Object-Oriented Programming SIGS},
year = {1988},
key = {Johnson:88},
volume = {1},
number = {5},
pages = {22-35},
month = jun
}

@book{UML-F:00,
author = {Fontoura M., Pree W., Rumpe B.},
editor = {Addison-Wesley},
title = {The UML Profile for Framework Architectures},
year = {2000},
}

The PDF is generated with a text like:

Something about something[4], and moo foo other children[1].

This citation [4] is the first in all text. How can I order this correctly to [1]...[2] ...?

1 Answer 1

235

You can achieve this by using the sorting=none option. Here is a fully working MWE:

\documentclass{article}
\usepackage[
    %backend=biber, 
    natbib=true,
    style=numeric,
    sorting=none
]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
   Aksin~\cite{aksin} says one in his article.
   Aristotle~\cite{aristotle:poetics} says two in his book.
   Angenendt~\cite{angenendt} says three in his article.
   And Augustine \cite{augustine} says four in his book.
  \printbibliography
\end{document}


From section 3.1.2 of the biblatex documentation:
biblatex knows various schemes for sorting, these are:

  • nty Sort by name, title, year.
  • nyt Sort by name, year, title.
  • nyvt Sort by name, year, volume, title.
  • anyt Sort by alphabetic label, name, year, title.
  • anyvt Sort by alphabetic label, name, year, volume, title.
  • ynt Sort by year, name, title.
  • ydnt Sort by year (descending), name, title.
  • none Do not sort at all. All entries are processed in citation order.
  • debug Sort by entry key. This is intended for debugging only.

If sorting still fails, try backend=biber, it is more stable especially with UTF8 .bib files.
Instead of calling (pdf)latex, bibtex, (pdf)latex, (pdf)latex
you would then instead call (pdf)latex, biber, (pdf)latex.

8
  • 1
    Even doing this, the books are coming first. Does this make sense?
    – Custodio
    Commented Apr 10, 2012 at 20:22
  • 2
    Is it possible for you to switch to backend=biber instead of backend=bibtex? Then take a look at my updated MWE. Maybe it helps.
    – matth
    Commented Apr 10, 2012 at 21:02
  • 3
    Biber's sorting code is a lot more advanced than bibtex. It also allows custom sorting schemes, not just the built in biblatex defaults
    – PLK
    Commented Apr 18, 2012 at 18:00
  • 18
    I was wondering today why sorting=none wouldn't work for me. My first citation would still be a [24] and deleting all .aux files etc. didn't help. It turns out that I had 24 (!) unused entries in my .bib file. After deleting all unused entries, everything was fine. I figured I'd put that here, maybe it'll save someone some time.
    – Lars
    Commented Jun 14, 2013 at 19:26
  • 3
    You might want to want that especially with numeric styles it might be necessary to delete all temporary files (.aux, .bcf, .bbl, ...) after changing the sorting in order for the new settings to take effect properly.
    – moewe
    Commented Jul 19, 2017 at 13:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .