Biblatex Sorting Bibliography by author and afterwards numbering it by appearence in bibliography

I'm using biblatex to create a bibliography with two parts, one part for literature and one part for internet sources. Now I want to sort each bibliography by NTY. Afterwards the entries in the bibliography should be numbered from top to bottom. This should happen in both bibliographies and I want the first number of the second bibliography to be the following of the last of the first bibliography.

I don't think a MWE would make sense because I don't even have a beginning of the problem.

• How would you like to specify which of the entries goes into the first and which goes into the second bibliography? (Just by entry type?) Do you already have the two part bibliography, or is obtaining that also a part of your question? Do you use the numeric style of biblatex? Really, an MWE of even the barest kind of set-up you already have could help us. – moewe Mar 6 '14 at 10:23
• Bibs are already split into two parts by using the code you also mentioned. I inserted \DeclarePresort[online]{zzzzzzzzzzzzz} but it didnt work. – Manuel Mar 6 '14 at 10:48
• Did you try my code snipped on your computer though? You will need to use Biber. – moewe Mar 6 '14 at 10:49
• are there any disadvanteges using biber with biblatex and texmaker ? – Manuel Mar 6 '14 at 11:46
• Is there a posibility to get it to work without using biber ? – Manuel Mar 6 '14 at 11:51

If you only want to split @online and all other types into two bibliographies, that is as easy as

\printbibliography[nottype=online]
\printbibliography[type=online]


The first command prints all entries save for those of type @online, while the latter prints only @online entries.

We then use defernumbers=true, this options makes sure "numeric labels (i.e., the labelnumber field [...]) are assigned the first time an entry is printed in any bibliography" (p. 52, §3.1.1 Load-time Options/defernumbers of the biblatex documentation)

nty sorting is obtained by

\usepackage[style=numeric,sorting=nty,defernumbers=true]{biblatex}


Full code

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[style=numeric,sorting=nty,defernumbers=true]{biblatex}
\usepackage{hyperref}

\begin{document}
\nocite{baez/online,cicero,wassenberg,wilde}
\printbibliography[nottype=online]
\printbibliography[type=online]
\end{document}


Here is a solution which works with biblatex independent of the backend used. Since the OP asked about using bibtex, my example specifies this, but nothing depends on it. backend=biber would work at least as well.

This answer is based on moewe's solution. I ran that code and read the output. biblatex suggested the defernumbers option there. Looking in the documentation, I learnt that defernumbers, unlike \DeclarePresort is not specific to biber. An added (but extremely minor) bonus is that it gets rid of the warning from biblatex on compilation.

In general, biblatex assigns numbers to reference entries at the beginning of the document. If defernumbers is set to true, however, it does not assign numbers until they are first used in the bibliography.

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[sorting=nty,defernumbers=true,backend=bibtex]{biblatex}
\usepackage{hyperref}

Note that the documentation warns that you need two runs of latex to get the numbering right, over and above the runs needed to get pagination etc. correct. Moreover, should you change the value of defernumbers, you will probably need to delete the .aux file. (Though I didn't find I needed to do this going from the default false setting to true.)