My question is how I can group the bibliographic records using biblatex on per-year-basis. I have tried the approach

  {\ifnum \thefield{year} = \themycounter
    {} }

and then using the command

,check = intheyear

changing the counter value manually, but this yields a result only if the command is called once. In the second calling of \printbibliography, pdflatex announces

! Incomplete \ifnum; all text was ignored after line <i>xx</i>.
<inserted text> 
<*> \input lpublications.tex

! Emergency stop.
<*> \input lpublications.tex

What I want to achieve is that I will have structure of references as


Braham, A., Edrich, B. ...

Ecilie, C., Ietrich, D. ...



If this was done automatically according to entries in .bib file. It would be fine. I have really no idea how to do that.

  • You might be able to use biblatex's concept of categories together with the \bibbycategory. Commented Jun 27, 2013 at 16:14
  • \ifnum requires \fi. You may use for example \ifnumequal{\thefield{year}}{\themycounter} Commented Jun 28, 2013 at 6:26

1 Answer 1


In the code below the first \printbibliography composes a list of years which is then used in a loop to print other bibliographies. The sorting option is used to sort the list (thanks to user32884 for suggesting this).

 author = {Author},
 title = {Title},
 journaltitle = {Superjournal},
 year = {2003},
 author = {Buthor},
 title = {Ztitle},
 journaltitle = {Superjournal},
 year = {2000},
 author = {Duthor},
 title = {Ztitle},
 journaltitle = {Superjournal},
 year = {2002},



  ,check = intheyear

enter image description here

  • Thnak you, this helped. I just had to remove double braces {{ }} at my year fields of the bib file to work. I also could solve the sorting problem by declaring my sorting scheme by \DeclareSortingScheme{dyear}{ \sort[direction=descending]{\field{year}} \sort{\field{author}} \sort{ \field{journal} \field{title} } } and modifying the group \begingroup% \makeatletter% \def\blx@driver#1{}% \printbibliography[env=counting,heading=none,type=article,sorting=dyear]% \makeatother% \endgroup% Commented Jun 28, 2013 at 12:34
  • Oh, yes, a simple solution, it didn't come to my mind. There is actually a standard sorting scheme ydnt which can be used for that. I added it to the answer. I also removed \AtEveryBibitem while modifying a little the counting environment. Commented Jun 28, 2013 at 13:04
  • This works great for me, except the years of my publications are now sorted in ascending instead of descending order. I copied and pasted the code without modification. Not sure what went wrong.
    – Xiaoyu Lu
    Commented Feb 25, 2019 at 6:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .