I'd like to have two lists of references in my document. However, I want each reference to appear only once in the entire document.
\documentclass{article}
\usepackage[backend=biber,defernumbers=true]{biblatex}
\bibliography{foo}
\begin{document}
\begin{refsection}
\section{Previous Track Record}
I am an acknowledged authority on aardvarks \cite{mynature}.
\printbibliography[prefixnumbers=A,heading=subbibliography]
\end{refsection}
\section{Research}
\begin{refsection}
I will use the methods developed in \cite{mynature} to address
the questions raised in \cite{other}.
\printbibliography[heading=subbibliography]
\end{refsection}
\end{document}
Here are the contents of foo.bib:
@article{mynature,
author={Ego Sum},
journal={Nature Soundbites},
title={Aardvarks are artistic},
year={2013}
}
@article{other,
author={Tu Es},
journal={Gnu Letters},
title={Gnus gnaw gnomes},
year={2014}
}
In the two bibliographies, I only want the paper in Nature Soundbites to appear once, and be cited in both places as [A1].
Any suggestions welcome!
Best Answer
You cannot use
refsection
here, because the contents ofrefsections
are kept completely separate and independent of each other, "synchronising" labels between them is therefore not possible.Here we can use
refsegment
s instead, they are not kept local, but work together.A
\printbibliography
does not automatically restrict itself to the currentrefsegment
, it needs to be told to do so withsegment=\therefsegment
, for example. Your first section then looks like thisFor the second section, we want to ignore those entries from the other segment, this can be done via a filter
issued in the first segment.
Then the second section becomes
Or use
\printbibliography[heading=subbibliography, filter=notother]
which only ignores the entries from segment one (and does not additionally restrict itself to the current segment - with your set-up there is no difference, but with a bigger document there could be).MWE
You can let the numbering in the second list start anew by adding
resetnumbers=true
to the\printbibliography
call.Another solution that does not require you to know the number of the segment in advance uses bibliography categories and a modification of
\AtEveryCitekey
that is kept local.and
Then we use
\AtEveryCitekeyLocal{\addtocategory{firstsection}{\thefield{entrykey}}}
from within the first segment. This assignment is kept local such that only citations within this group (i.e. within this refsegment) get added to the category.The second segment bibliography simply needs to filter those works with
notcategory=firstsection
MWE