I would like to ensure that all entries in the bibliography are sorted by year. In addition, a separate heading should be generated for each year. The whole should run as automatically as possible, i.e. I don't want to manually create "keys" for each year. My first thought was something like that:
\foreach \year in {2013,...,2018} {\printbibliography[year=\year, title=\year]}
Unfortunately biblatex does not offer an option year=... (That would be a nice feature). What I have achieved so far is that for each year a heading is created, and all entries are sorted correctly under the corresponding year. However, in the years in which there was no publication, a heading is erroneously created with no entries under it. Below you can see my MWE. I don't understand why \printbibliography[check=publicationInThisYear] is "executed" even though the check should fail for the case that there was no citation in the current year. Outside the loop, \printbibliography[type=thesis] has a different behaviour. As expected, it does not generate an entry (while the "thesis-bibentry" Bar2017b is commented out and the check fails). Where's the mistake?
\documentclass{article}
\usepackage{filecontents}
\usepackage{pgffor}
\usepackage[sorting=ynt]{biblatex}
\begin{filecontents*}{\jobname.bib}
@inproceedings{Bar2014,
author = {F. Bar and B. Foo},
booktitle = {The conference 2014 on nothing},
pages = {1--2},
title = {{A meaningless title}},
year = {2014}
}
@article{Bar2015a,
author = {F. Bar and B. Foo},
booktitle = {The conference 2015 on nothing},
pages = {1--2},
title = {{A meaningless title}},
year = 2015
}
@inproceedings{Bar2015b,
author = {F. Bar},
booktitle = {International Conference on Information 2015},
pages = {3--4},
title = {{Advanced functionality and performance or nothing }},
year = {2015}
}
@book{Bar2017,
author = {F. Bar and B. Foo},
booktitle = {The conference on nothing},
pages = {1--2},
title = {{A meaningless title}},
year = {2017}
}
@inproceedings{Bar2018,
author = {F. Bar and B. Foo},
booktitle = {The conference on nothing 2018},
pages = {1--2},
title = {{A meaningless title}},
year = {2018}
}
%@thesis{Bar2017b,
%author = {F. Bar},
%title = {Bar Thesis},
%type = {Dissertation},
%year = {2017},
%}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\def\yrlist{2013,...,2018}
\foreach \yr in \yrlist{
\defbibcheck{publicationInthisYear}{
\ifnumequal{\thefield{year}}{\yr}{}{\skipentry}
}
\printbibliography[check=publicationInthisYear, title=\yr]
}
\printbibliography[type=thesis]
\end{document}


labelyear, which is not generated by default fornumeric. You could explicitly ask for it with optionlabeldateparts=true. (Or adapt the code not to rely on labeldate and co.) – gusbrs Jan 30 '19 at 18:11defernumbers=truethough. – gusbrs Jan 30 '19 at 18:24