[Tex/LaTex] biblatex – Consistent numbering in split bibliographies

biblatex

I have a document in which the bibliography is splitted via categories. I would like to reference to the elements by numbers [1]. Inside each bibliography, the entries should be sorted by year-name-title (ynt), but the numbers in the first bibliography should be smaller than the numbers in the second one.

MWE:

\documentclass{article}

\usepackage[sorting = ynt,bibstyle=numeric]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
    @book{a,
        author = "I",
        year = "1973"
    }
    @book{a2,
        author = "I",
        year = "1923"
    }
    @book{b,
        author = "You",
        year = "1959"
    }
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareBibliographyCategory{own}

\begin{document}

\nocite{a,a2}
\addtocategory{own}{a,a2}
\nocite{b}

\printbibliography[category=own,title={A}]
\printbibliography[notcategory=own,title={B}]

\end{document}

Now, the order of the numbers in the bibliography is "[1],[3]" in the first list, and "[2]" in the second list. This looks odd and if there are more items, one has to search through both lists in order to find a reference. I would like to have "[1],[2]" in the first list and "[3]" in the second list.

An option is to add a "presort" key to the corresponding entries in the bib-file, but I would like to not touch the bib-file. Is there, e.g., any possibility to add the "presort" key afterwards in the tex-file? Or can biblatex sort by category (I searched the manual but did not found any clue)?

Best Answer

Follow biblatex's advice in the .log file

Package biblatex Warning: Setting 'defernumbers=true' recommended.

and use defernumbers=true.

edit: Newer versions of biblatex do not recommend defernumbers in the .log file any more following https://github.com/plk/biblatex/issues/493. In most cases it is still a very good idea to use defernumbers with split numeric bibliographies.

The biblatex documentation explains on p. 53

In contrast to standard LaTeX, the numeric labels generated by this package are normally assigned to the full list of references at the beginning of the document body. If this option is enabled, numeric labels [...] are assigned the first time an entry is printed in any bibliography.

and notes in ยง3.12.5 Bibliography Filters and Citation Labels, p. 121, that

The citation labels generated by this package are assigned to the full list of references before it is split up by any bibliography filters. They are guaranteed to be unique across the entire document (or a refsection environment), no matter how many bibliography filters you are using. When using a numeric citation scheme, however, this will most likely lead to discontinuous numbering in split bibliographies. Use the defernumbers package option to avoid this problem. If this option is enabled, numeric labels are assigned the first time an entry is printed in any bibliography.