# biblatex: multiple bibliographies with same prefix, using resetnumber

I've tried a few days to get the following done with biblatex:

I need two bibliographies, whose entries should be preceded by a letter, e.g. "A". The second bibliography should continue the numbering from the first, i.e. it should read

First bibliography

[A1] Some reference

[A2] some other reference

Second bibliography

[A3] a third reference

[A4] and the last reference

Main bibliography

[1] a reference

[2] another reference

[3] and so on

The MWE I used for testing:

\begin{document\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[sorting=none,backend=bibtex8]{biblatex}

\begin{document}

\nocite{aristotle:physics,aristotle:poetics,nussbaum,pines,vangennep,wassenberg}

\printbibliography[keyword=primary, title={primary}, prefixnumbers={A}]
\printbibliography[keyword=secondary, title={secondary}, prefixnumbers={A}]
\printbibliography[notkeyword=primary,notkeyword=secondary, title={other},resetnumbers]

\end{document}


I read the manual about the defernumbers and resetnumbers options to biblatex. Maybe I get something wrong there... So far I tried:

• global option defernumbers not set results in [A1], [A2], [A3], [A4], [5], [6], ... (and a warning that defernumbersshould be set to 'true' globally...)
• defernumbers=true results in [A1], [A2], [A1], [A2], [1], [2], ...
• resetnumbers doesn't have any effect, no matter if defernumbers is true or false (in the latter case obviously as the global option is a requirement for resetnumbers). It doesn't have an effect if I try to reset the number of the second prefixed bibliograpy, too (as far as I understand, resetnumbers is implicitly contained in prefixnumbers...)

Is the only way to achieve the bibliographies as written above by defining different bib-environments like in Override implicit resetnumbers when using Biblatex's prefixnumbers?!

No biblatex-solution possible? I even tried the dev-Version 3.0, but to no avail...

Any hints for that problem are appreciated

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[sorting=none,backend=biber,defernumbers]{biblatex}

\begin{document}

\cite{aristotle:physics,aristotle:poetics,nussbaum,pines,vangennep,wassenberg}

\makeatletter
\begingroup
\def\blx@prefixnumbers{A}
\printbibliography[keyword=primary, title={primary}]
\printbibliography[keyword=secondary, title={secondary}]
\endgroup

\printbibliography[notkeyword=primary,notkeyword=secondary, title={other},resetnumbers]

\end{document}


# Remarks

• I changed to biber and didn't test with bibtex8
• Delete the aux-file before the test - biblatex stores label values there and they can be very persistent.

• Thanks, Ulrike. Using \begingroup ... \endgroup didn't came to my mind, although I already use it in my document :(. I tried biber also because I didn't know if the things I saw were related to bibtex. However, it seems to be e little bit tricky to run biber from WinEdt without some adjustments. But this is some other issue. Your solution works like a charm, also with bibtex :) – Hanno Apr 14 '15 at 7:52
• Unfortunately, prefixnumbers has been removed from biblatex with version 3.4, so that this solution does not work anymore. – DigNative Jun 22 '16 at 20:18
• @DigNative: Hm yes. Not quite sure if something can be done, with refcontext and labelprefix the numbering is reset. You could ask at the biblatex issue tracker github.com/plk/biblatex/issues – Ulrike Fischer Jun 22 '16 at 21:02
• @moewe Do you know why biblatex forces resetnumbers on every bibliography in a refcontext? – Ulrike Fischer Jun 22 '16 at 21:03
• @UlrikeFischer I opened a bug report concerning the resetnumbers issue with \printbibliography yesterday: github.com/plk/biblatex/issues/443 – DigNative Jun 23 '16 at 6:35

This was really a bug. It is fixed in biblatex 3.5 (requires biber 2.6) (both currently in DEV on Sourceforge). It is now possible to specify resetnumbers=false as normal to suppress the implicit reset. I contemplated revoking this implicit reset but I can see why it was implemented - people would often expect that a change of prefix (or perhaps the mere presence of a prefix at all, even if it's the same as a previous bibliography prefix) would reset numbering. Unfortunately the implementation was fairly simple in that the reset happened if any prefix was set at the time of a \printbibliography and changes of prefix were not tracked. I don't think it's worth tracking changes of prefix and so you can simply override the behaviour in a natural way by explicitly not resetting, which seems to be what everyone expects to be able to do. The solution, updated for biblatex 3.3+ is:

\documentclass[a4paper,12pt]{article}

\usepackage[sorting=none, defernumbers]{biblatex}

\begin{document}

\nocite{aristotle:physics,aristotle:poetics,nussbaum,pines,vangennep,wassenberg}
\newrefcontext[labelprefix=A]
\printbibliography[keyword=primary, title={primary}]
\printbibliography[keyword=secondary, title={secondary}, resetnumbers=false]
\newrefcontext
\printbibliography[notkeyword=primary,notkeyword=secondary, title={other}, resetnumbers]

\end{document}


Note the necessity of the resetnumbers in the last \printbibliography because the plain \newrefcontext empties the labelprefix which stops the implicit resetting.