I would like to print the remaining entries in a .bib
file using biblatex
, that is, I have a large set of entries which I print at several places throughout a document using various calls to \printbibliography
, and then I want to end by printing whatever references that have not yet been printed. The desired solution should not depend on the .bib
entries themselves, that is, the whole point is not to have to go through the entries and add keywords or similar.
My current non-working solution uses \AtEveryBibitem
to put printed entries in a category to be able to print all entries that are not yet in this category. This strategy of course works only halfway, though, since it ends up in an oscillation where the uncategorized entries ends up in the category every second time since \AtEveryBibItem
is also run for these entries when they are printed (so if the \AtEveryBibitem
statement can in some way be reset before the last call to \printbibliography
that would be a solution).
MWE:
\documentclass{article}
\usepackage{biblatex}
\begin{filecontents}{mybib.bib}
@article{ref1,
author = {Guyon, Isabelle and Elisseeff, Andr\'{e}},
journal = {The Journal of Machine Learning Research},
pages = {1157--1182},
title = {{An introduction to variable and feature selection}},
volume = {3},
year = {2003}
}
@book{ref2,
author = {Michel Goossens and Frank Mittelbach and Alexander Samarin},
title = {The LaTeX Companion},
year = {1993},
publisher = {Addison-Wesley},
address = {Reading, Massachusetts}
}
@inproceedings{ref3,
author = {Conf Author},
title = {Conf Title},
year = {2040},
keywords = {confpaper}
}
\end{filecontents}
\addbibresource{mybib.bib}
\DeclareBibliographyCategory{printed}
\AtEveryBibitem{\addtocategory{printed}{\thefield{entrykey}}}
\begin{document}
\nocite{*} % The .bib file contains several hundreds of entries
\printbibliography[title={Journal articles},type=article]
\printbibliography[title={Conference papers},keyword=confpaper]
% Many other bibliographies are printed using various \printbibliography statements
% And now the entries that have never been printed should be printed
\printbibliography[title={Uncategorized},notcategory=printed]
\end{document}