# Custom biblatex style to distinguish two bibliographies in the same document

I asked previously how to include many bibliographies in my PhD thesis manuscript. I was advised to use biblatex and it has been doing the job. I use refsection and call \printbibliography[heading=subbibliography] at the end of several chapters. The rest document has references pointing to a bibliography at the end of the manuscript.

My point is that I would like to make the referecens easy to be distinguished, but since they are all numbers I have several [1] pointing to different references. It would be enough to have, for the references outside the refsection environments a different style such as [g1] instead of [1]. How can I customize that when calling \printbibliography?

============================

EDIT:

To illustrate my problem, here is a simplified version of my tex file: \documentclass{report}

\usepackage[backend=bibtex]{biblatex}
\begin{document}
\nocite{*}
\chapter{Test bib 1}
\begin{refsection}
\input{TB1.tex}
\printbibliography[heading=subbibliography] % This reference style is [1],[2],....
\end{refsection}
\newpage
\printbibliography % This reference style is the same but I would like it to be [g1],[g2],...
\end{document}

Cheers.

• It would be nice to see a minimal working example with bibliography (MWEB), that illustrates your problem. – Bobyandbob Aug 28 '17 at 16:20
• I would strongly suggest not to do this. I would either use a separate bibliography for each and every chapter, or a single bibliography for the whole thesis. – Michael Palmer Aug 28 '17 at 17:00
• I think that an MWE/MWEB would not only show us what set-up you are using, but it would also allow us to understand what exactly you want to do. In general it is possible to prefix citation labels with letters, but certain conditions have to be met for this to work properly. – moewe Aug 28 '17 at 17:38
• Note that refsections in their nature are entirely separated, so it is reasonable that the numbering should start anew in a new refsection. If you want unique numbering, maybe refsegments are for you (but again, maybe they are not). – moewe Aug 28 '17 at 17:39

If I read your question right, I think \newrefcontext will do what you want. But (I think) you'll need to switch to biber instead of bibtex for the backend.

\documentclass{article}
\usepackage[defernumbers]{biblatex}
\usepackage{parskip}
\pagestyle{empty}
\begin{document}
\cite{bertram}

\begin{refsection}
\textbf{first refsection begins}

\cite{bertram}
\printbibliography

\textbf{first refsection ends}
\end{refsection}

\cite{gillies}

\begin{refsection}
\textbf{second refsection begins}

\cite{herrmann}
\printbibliography

\textbf{second refsection ends}
\end{refsection}

\cite{herrmann}
\newrefcontext[labelprefix=g]
\printbibliography
\end{document}

• Thank you for the input. I installed biber which I was lacking, but copying your code is not giving me what I want. It still outputting the references without any g and when compiling I get ! Package keyval Error: labelprefix undefined.. Am I missing some package? – Decaying Sep 1 '17 at 15:02
• Okay, the bug is because of using an old version of biblatex or biber. I just updated it all and it is working. Many thanks! – Decaying Sep 1 '17 at 15:26