Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
\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},
}

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

Thanks in advance.

share|improve this question

2 Answers 2

up vote 24 down vote accepted

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.

share|improve this answer
    
Even doing this, the books are coming first. Does this make sense? –  Custódio Apr 10 '12 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 Apr 10 '12 at 21:02
    
It works like a charm. What's the behavior change of this modification? –  Custódio 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
1  
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}
share|improve this answer
    
Even doing this, the books are coming first. Does this make sense? –  Custódio Apr 10 '12 at 20:21
3  
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? –  Custódio 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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