Biblatex – How to Add a Prefix to Citations and References in LaTeX?

biblatexbibliographiesciting

I am looking to add a prefix, say P to the reference list, so:

(1) the list will appear like

References

[P1] …

[P2] ..

(2) when I cite them they appear as [P1] also.

I added the following to the preamble

\makeatletter

\def\@biblabel#1{[P#1]}

\makeatother

but this achieves the first requirement, not the second. So now when I cite the citation still appears as [1].

How to remedy this?

Thanks

Best Answer

This solution works only with older version (3.4) of biblatex

I think that you are looking for the following solution:

\documentclass{article}

\usepackage[backend=bibtex]{biblatex}


\addbibresource{\jobname.bib}

\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
  @book{lamport1994latex,
    title={LATEX: a document preparation system: user's guide and reference manual},
    author={Lamport, Leslie},
    year={1994},
    publisher={Addison-wesley}
  }
  @book{mittelbach2004latex,
    title={The LATEX companion},
    author={Mittelbach, Frank and Goossens, Michel and Braams, Johannes and Carlisle, David and Rowley, Chris},
    year={2004},
    publisher={Addison-Wesley Professional}
  }
\end{filecontents*}

\pagenumbering{gobble}

\begin{document}

\cite{lamport1994latex} is the one we started our journey with. Then
we also got~\cite{mittelbach2004latex}.  Both
\cite{lamport1994latex,mittelbach2004latex} are good ones.

\printbibliography[prefixnumbers=P]

\end{document}

enter image description here


For details, please see page 76 of the biblatex documentation.

Related Question