# biblatex: Customise individual labels in bibliography section

Using biblatex, I would like to manually adjust some few labels (I mean: [1], [2]) in the bibliography section and the text body of the document.

The same question was posed for bibtex, see Customizing individual biblabels? while I am interested in a solution for biblatex.

The idea is that all own publications are indicated as [P1], [P2] etc.

[P1] Gladstone Gander. How to be lucky. Nature, 42:1-33, 2001.


while all other publications are indicated as [3], [4] etc.

[2] Donald Duck and Fethry Duck. How to be unlucky. Nature, 43:34-44, 2002.


Then, one could use \nocite{} at the beginning of the mainmatter to make sure that all own publications appear on the top of the bibliography section and that numbering of all other references continues with the next integer number.

\usepackage[style=numeric-verb,backend=bibtex,sorting=none,sortcites=true,firstinits=true,isbn=false,maxcitenames=99,bibencoding=latin1]{biblatex}


Thanks in advance for some hints!

• You also can use bibliography categories or add a keyword field to your data. See § 3.6.7, p.79, Bibliography categories, and § 3.11.4, pp. 109–111, Subdivided bibliographies in the documentation. – Bernard Apr 1 '15 at 12:46
• Please add a Minimum Working Example so that we can more easily help you. This is not difficult to do in biblatex, I don't think, but creating an example from scratch is no fun ;). – cfr Apr 1 '15 at 23:00

This is actually surprisingly easy. You will just have to have a way to distinguish those entries with a modified label. There are at least two ways to do that, the two ways are fundamentally different though.

Use keywords, you can just add keywords = {modlabel} to the .bib entry and filter the bibliography with keyword=modlabel and notkeyword=modlabel. In this case, you will decide in the .bib file whether an entry is to have the modified numbering or not.

When you use a bibliography category approach, this decision is delayed and only made in the actual .tex document. We define a bibliography category

\DeclareBibliographyCategory{modlabel}


Add the respective entries to this category via \addtocategory{modlabel}{<key>} and filter the bibliography with category=modlabel and notcategory=modlabel.

You will have to load biblatex with the defernumbers=true option for both approaches to work properly.

Then we just print the bibliographies

\printbibliography[prefixnumbers=P,category=modlabel]


MWE (which uses bibliography categories)

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[style=numeric-verb, backend=bibtex, sorting=none, defernumbers=true]{biblatex}

\DeclareBibliographyCategory{modlabel}

\begin{document}
\nocite{geer,wilde,cicero,markey,aristotle:physics,aristotle:rhetoric}
\printbibliography[prefixnumbers=P,category=modlabel]
\end{document}


In order to avoid the slightly increased spacing between the two \printbibliographys add the following to your preamble

\defbibenvironment{bibliography}
{}
{}
{\item}

\newenvironment{spacedbib}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}


And enclose the \pritntbibliograpy commands in this new spacedbib environment like so

\begin{spacedbib}
\printbibliography[prefixnumbers=P,category=modlabel]
\end{spacedbib}

• Works fine! Now, the only question, I have left would be: how to control the distance between the two sets of references? But that is only for curiosity... – Rantanplan Apr 7 '15 at 12:10
• @Rantanplan I had hoped it was too subtle to be noted, but should have known better. See the edit for a very crude work-around. A separate question about the spacing between two (or more) consecutive \printbibliographys might be worth asking, I suppose, maybe someone has a more elegant solution. – moewe Apr 7 '15 at 14:55
• Wow! There might be a small mistake; when compiling, I receive an error saying Something is wrong, perhaps a missing \item?. – Rantanplan Apr 17 '15 at 18:09
• @Rantanplan I see, that is not very nice. The problem occurs only if the bibliography is empty (i.e. if there is no entry with the corresponding keywords). Naturaly then, this also happens on the first run, if no .bbl file is present. If you push through with the compilation despite the error and run BibTeX/Biber the .bbl is created and the following LaTeX compilation works. – moewe Apr 18 '15 at 5:18
• @Rantanplan I cannot think of a nice work around for that. So I suggest you ask a new question about making two consecutive \printbibliographys follow each other seamlessly. – moewe Apr 18 '15 at 5:20