I'm trying to print the bibliography from different bib
files in different sections.
I know that that the command \nocite{*}
allows to print all the references, but in my case I want them to be separated according to the file they stand. I don't know if it's quite clear, here is an ECM where I enter by hand all the references for each section, using refsection
. The output is what I want, but I would prefer not to enter by hand the nocite
for every reference (and I'm sure it is possible to do so 😉)
% main.tex
\documentclass{article}
\usepackage{biblatex}
\addbibresource{biblio1.bib}
\addbibresource{biblio2.bib}
\begin{document}
\section*{Biblio 1}
\begin{refsection}
\nocite{refA}
\nocite{refB}
\printbibliography[heading=subbibliography]
\end{refsection}
\section*{Biblio 2}
\begin{refsection}
\nocite{refC}
\nocite{refD}
\printbibliography[heading=subbibliography]
\end{refsection}
\end{document}
with the bib
files :
% biblio1.bib
@misc{refA,
author = {Alfred},
title = {Amazing book},
year = {2000},
}
@misc{refB,
author = {Bruce},
title = {Best book},
year = {2021},
}
% biblio2.bib
@misc{refC,
author = {Craig},
title = {Catastrophic book},
year = {2000},
}
@misc{refD,
author = {Denis},
title = {Disastrous book},
year = {2000},
}
Here is the output :
biblatex
, it has abibbycategory
function.