I'm trying to make a publication list where all my publications (in a .bib file) are shown (most recent first), divided by type (article, thesis, book etc.). For now, I came up with something that more or less works, except that the counter is shared between all the different bibliographies, see the following picture.
I would like the counters in Articles to be [1]
, [2]
, ...
and then the counters in Books to reset and be [1]
, [2]
, ...
and so forth.
The code for the MWE above is the following:
\documentclass{article}
\usepackage[sorting=ymdnt, backend=biber]{biblatex}
\DeclareSortingScheme{ymdnt}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field{month}
\literal{9999}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{knuth1986texbook,
keywords = {book},
title={The texbook},
author={Knuth, D.E. and Bibby, D.},
volume={1993},
year={1986},
publisher={Addison-Wesley}
}
@article{knuth1977fast,
keywords = {article},
title={Fast pattern matching in strings},
author={Knuth, D.E. and Morris Jr, J.H. and Pratt, V.R.},
journal={SIAM journal on computing},
volume={6},
number={2},
pages={323--350},
year={1977},
publisher={SIAM}
}
@article{doe2001,
keywords = {article},
title={Whatever},
author={Doe, John},
journal={SIAM journal on computing},
volume={6},
number={2},
pages={323--350},
year={2001},
publisher={SIAM}
}
\end{filecontents}
\addbibresource{references.bib}
\begin{document}
\nocite{*}
\printbibliography[type=article,title=Articles]
\printbibliography[type=book,title=Books]
\end{document}