I have to use multiple bibliographies, but some of those should share the same number prefix. Biblatex allows to set prefixnumbers, but this implicitly enforces resetnumbers. This results in multiple usage of a label, since the numbering is resetted at each printbibliography call.
The following example illustrates the problem:
\documentclass[a4paper,oneside]{article}
\usepackage{filecontents}
\begin{filecontents*}{bib.bib}
@Misc{A,
author = {A Author},
title = {Title},
year = 2013,
}
@Misc{B,
author = {B Buthor},
title = {Title},
year = 2013,
}
@Misc{C,
author = {C Cuthor},
title = {Title},
year = 2013,
}
\end{filecontents*}
\usepackage[english]{babel}
\usepackage[style=numeric-comp,defernumbers,backend=biber]{biblatex}
\addbibresource{bib.bib}
\DeclareBibliographyCategory{catA1}
\DeclareBibliographyCategory{catA2}
\DeclareBibliographyCategory{catB}
\addtocategory{catA1}{A}
\addtocategory{catA2}{B}
\addtocategory{catB}{C}
\begin{document}
\cite{A} supposed to be [A1]\\
\cite{B} supposed to be [A2]\\
\cite{C} supposed to be [B1]
\section{Part A1}
\printbibliography[category=catA1,prefixnumbers={A}]
\section{Part A2}
\printbibliography[category=catA2,prefixnumbers={A}]%resetnumbers=false does not work here
\section{Part B}
\printbibliography[category=catB,prefixnumbers={B}]
\end{document}
How can I tell Biblatex to NOT reset the numbering when printing the second bibliography?
Best Answer
A possible, and "hackish", way to do this is to use the
biblatex
ability to (re)define differentbibliography
environments.Thus one can create two
bibliography
environments: one for the A prefix publications, and the second for the B publications (the solution useenumitem
package, i.e.,\usepackage{enumitem}
, to help with the redefinition of thebibliography
environments asenumerate
, and its ability to resume numeration over differentenumerate
s)Notice that we have to define how the label of the enumerate appears and also the format of the references (
ref
). This solution also requires to redefine the various citation commands. For\cite
a possible redefinition isSimilar definitions are needed for other cite commands. A better way would be to redefine the appropriate
bibmacro
s.The final step is to call the bibliography with the desired bibliography environment using the
env
option (this it not required forbibliography
).The result is