32

Update 5-Sep-2012: Sorry for highjacking this question, but as the status of the accepted selected answer has changed (now multiple sorting is implemented with biber/biblatex), and I think it is a good idea to update the answer of this question rather than me posting a new but nearly identical question.

The question is how have different portions or fragments of the bibliography (separated e.g. by type) appear under different headings and each with a different sort order.

I've tried using the sorting option of \printbibliography as suggested by PLK's answer bellow, but the numbers come out in the wrong order. Minimal example follows:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{biblatextest.bib}
@BOOK{BookA03,
  author    = {Author Aaa},
  title     = {Some Title},
  publisher = {Some Publisher},
  year      = 2003
}
@BOOK{BookB02,
  author    = {Author Bbb},
  title     = {Some Title},
  publisher = {Some Publisher},
  year      = 2002
}
@ARTICLE{PaperC04,
  author  = {Author Ccc},
  title   = {Some Title},
  journal = {Some Journal},
  year    = 2004,
}
@ARTICLE{PaperD01,
  author  = {Author Ddd},
  title   = {Some Title},
  journal = {Some Journal},
  year    = 2001,
}
\end{filecontents}
\usepackage[defernumbers=true]{biblatex}
\addbibresource{biblatextest.bib}
\begin{document}

\textcite{PaperD01}
\textcite{PaperC04}
\textcite{BookB02}
\textcite{BookA03}

\printbibliography[title={Books},type=book,sorting=nty]
\printbibliography[title={Articles},type=article,sorting=ynt]
\end{document}

The order of the bibliography entries in the output is correct, but the numbers are not. I get: "Books [3] [2]" and "Articles [1] [4]", rather than "Books [1] [2]" and "Articles [3] [4]" as I would expect.


Using biblatex how would one sort different sections in the bibliography by different criteria e.g.

  • Section A of biblio: Sort by name, title, year, and
  • Section B of biblio: Sort by year, name, title.

For instance Section A would be a list of books and Section B a list of Proceedings where the Proceedings should be sorted by year.

Comment:

Different sections of a bibliography can be separately sorted by using sorttitle={}, see the example here:

@PROCEEDINGS{Feldman2000,  
title = {Feldman v Mexico, ICSID Case No. Arb(AF)/99/1 (NAFTA)},  
year = {6 December 2000},  
shorttitle = {Feldman v Mexico},  
sorttitle = {2000}  
}  

@PROCEEDINGS{JoyMining2004,  
  title = {Joy Mining Machinery Limited v. Arab Republic of Egypt, ICSID Case
    No. Arb/03/11},  
  year = {6 August 2004},  
  shorttitle = {Joy Mining v Egypt},  
  sorttitle = {2004}  
}

Is there another way to accomplish the same thing?

Juan A. Navarro
  • 62,139
  • 32
  • 140
  • 169
INTINV
  • 550
  • I how have a beta version of biblatex and biber which support a "sorting" option for \printbibliography and \printshorthands. Please contact me if you would like to try it. – PLK Apr 16 '12 at 09:36

2 Answers2

29

This is not currently possible. However the functionality for this is implemented in biber already and will be made visible through biblatex in the near future. This will allow you to specify different sorting not only for each refsection but for multiple bibliography lists in the same refsection.

This is now possible with biblatex 3.x and biber 2.x:

\newrefcontext[sorting=nty]
\printbibliography[type=book]

\newrefcontext[sorting=ynt]
\printbibliography[type=proceedings]

In older versions (biblatex 2.x and biber 1.x):

\printbibliography[sorting=nty, type=book]

\printbibliography[sorting=ynt, type=proceedings]
PLK
  • 22,776
  • It seems that this functionality is now available. Would you care to update your answer to provide an example on how to do this? – Juan A. Navarro Sep 04 '12 at 14:34
  • I have updated the answer to show how to do this with biblatex 2.0/biber 1.0 – PLK Sep 04 '12 at 14:51
  • I'm having trouble getting your solution to work. I've updated the question to reflect this. Do you think you could provide me some help? Or should I better start a new question? – Juan A. Navarro Sep 05 '12 at 13:31
  • Did you try the defernumbers pacakge option? – PLK Sep 05 '12 at 14:27
  • Yes. The option is activated in my minimal example. – Juan A. Navarro Sep 05 '12 at 15:47
  • Ah sorry. One thing to check ... the manual says to run latex twice after biber whenusing derefnumbers ... can you verify this? If you run once, it will not work correctly. – PLK Sep 05 '12 at 15:56
  • Yes, for a moment I also thought that this was the problem, but I've checked and the problem persists even after running pdflatex + biber + pdflatex + pdflatex. Do you get the same result if you typeset on your own system? – Juan A. Navarro Sep 05 '12 at 17:27
  • @JuanA.Navarro The labelnumbers are assigned according to the document sorting scheme (here none; the cite order). Resetting the scheme in \printbibliography won't change the labelnumber. – Audrey Sep 06 '12 at 13:39
  • @Audrey I understand. But then, is it actually possible to break a bibliography into sections with different citation orders? Or this remains non-implemented yet? I am also a bit confused then, as well, about the meaning of defernumbers. – Juan A. Navarro Sep 06 '12 at 13:55
  • 1
    @JuanA.Navarro Sorry - defernumbers as documented should have the labelnumber re-assigned at \printbibliography, but biblatex doesn't seem to properly handle the sorting option. Would you mind posting an issue at github? It's probably a better place to get this resolved. – Audrey Sep 06 '12 at 15:51
  • @Audrey, thanks for the pointer. I've just added a post there. – Juan A. Navarro Sep 06 '12 at 16:58
4

Biblatex 3.0 (2015-04-20) introduces the concept of bibliography contexts for this. See section 3.6.11 of the manual. (For this reason the sorting option in \printbibliography has now been deprecated.)

Stefan Kottwitz
  • 231,401