Following this example to number the entries in the bibliography and this example to have multiple bibliographies, I am able to show two bibliographies with separate counters.
I want to have the same counter for both bibliographies. For that, I thought I can use enumitem like in the MWE below. However, this does not work for some reason. What am I doing wrong? Is there a way to have a single counter for both bibliographies using enumitem or otherwise?
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Doe2012a,
author = {J. Doe},
title = {Lorem Ipsum -- Part I},
journal = {J. Dolor Sit Am.},
volume = {1},
pages = {1--10},
month = {1},
year = {2012},
}
@article{Doe2012b,
author = {J. Doe},
title = {Lorem Ipsum -- Part II},
journal = {J. Dolor Sit Am.},
volume = {2},
pages = {11--20},
month = {2},
year = {2012},
}
@book{Doe,
author = {J. Doe},
title = {Lorem Ipsum -- Complete Works},
publisher = {{Dolor S. Amet and Sons}},
year = {2011},
}
\end{filecontents}
\usepackage[backend=biber, sorting=nty, style=authoryear]{biblatex}
\usepackage{enumitem}
\addbibresource{\jobname.bib}
\defbibenvironment{bibliography}
{\begin{enumerate}[resume]
{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\end{enumerate}}
{\item}
\begin{document}
\nocite{*}
\printbibliography[title=Articles, type=article]
\printbibliography[title={Books}, type=book]
\end{document}

[series=bib, resume=bib]rather than justresume, which seems to work. I'm not going to post that as an answer because I don't understandenumitemwell enough to be sure it's actually correct or why! – Paul Stanley May 01 '20 at 23:53