# Biblatex citation order

I'm having some problem with my biblatex order of citation.

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}


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.},
title = {The UML Profile for Framework Architectures},
year = {2000},
}


My 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] ...?

-

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}

\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.

-
Even doing this, the books are coming first. Does this make sense? –  Custodio Apr 10 '12 at 20:22
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 Apr 10 '12 at 21:02
It works like a charm. What's the behavior change of this modification? –  Custodio Apr 10 '12 at 22:17
Good to hear it works. You can read more about biber on the biber homepage or here on this site: tex.stackexchange.com/questions/25701/… –  matth Apr 11 '12 at 7:37
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 Apr 18 '12 at 18:00

To have the elements in the bibliography appear in the order they were cited, add

sorting=none


as an option to biblatex, i.e.

\usepackage[natbib=true,style=numeric,sorting=none]{biblatex}

-
Even doing this, the books are coming first. Does this make sense? –  Custodio Apr 10 '12 at 20:21
It works for me, with sorting=none the order is as cited, without it is alphabetical. Not sure if if can make a difference, but try deleting all temporary files (.aux, .bbl etc.) and recompile. If it still doesn't work, can you create a complete, compilable example showing demonstrating the problem? –  Torbjørn T. Apr 10 '12 at 21:07
the modification suggested by @matth works like a charm, now I'm using \usepackage[backend=biber,style=numeric,sorting=none]{biblatex}. Does it make sense to you, or clear all aux and bbl files will make the same job? –  Custodio Apr 10 '12 at 22:19
Good to hear it worked out. I can't tell you if deleting auxiliary files would work, you would have to try that yourself. All I can tell you is that for me, with the .bib file and preamble you posted, it worked fine also with BibTeX. On the other hand, Biber is better, as it has Unicode support and is developed alongside biblatex, so I don't think it's a bad idea to switch anyway. –  Torbjørn T. Apr 11 '12 at 6:09