I have different categories (filters) for entries in a bibliography using biblatex (see below). I would like to add a numbering to the entries. Since the entries are sorted by year in decreasing order, the numbering (in each category) should also be decreasing.

Basically, I see two routes to go:

1) The first is to use style=numeric and a solution presented here. However, in my (not so minimal) example, there appeared two problems. First, the number does not start over again for each of the categories (instead, it continues). Second, I obtained weird numbers (up to 400), although I only had a couple of entries with the same keyword.

2) The second (probably easier) I found here. This is actually a nice idea (and lets you specify the numbering etc.), but I couldn't figure out two things: First, how to get decreasing numbering. Second, if you have > 9 entries, the space reserved for the label is too small and the 10th entry is not vertically aligned with the 9 before. This can probably be adjusted with itemindent, but when I tried, the adjustments did not have an effect.


% packages
style=authoryear,% numeric,
sorting=ydnt% sort by year (descending), name, title

% create dummy .bib file
    author={I Me},
    journal={Journal of LaTeX questions},
    title={My first LaTeX problem},

    author={I Me},
    journal={Journal of LaTeX questions},
    title={My second LaTeX problem},

    author={I Me},
    journal={Journal of LaTeX questions},
    title={My third LaTeX problem},

% bibliography settings
\setlength{\bibhang}{1em}% separate bibitems by indentation
\defbibheading{submitted}{\large\sffamily Submitted}% heading
\defbibheading{published}{\large\sffamily Published}% heading
\defbibfilter{submitted}{keyword=submitted}% filter
\defbibfilter{published}{keyword=published}% filter
\addbibresource{mybib.bib}% bibliography data

% % Idea 1) 
% \AtDataInput{%
%   \csnumgdef{entrycount:\therefsection}{%
%     \csuse{entrycount:\therefsection}+1}}
% \DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}
% \newrobustcmd*{\mkbibdesc}[1]{%
%   \number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}

% Idea 2)
{\setlength{\leftmargin}{\bibhang}% => adjustments seem to have no effect
\setlength{\itemindent}{-\leftmargin}% => adjustments seem to have no effect

\printbibliography[heading=submitted, filter=submitted]
\noindent\printbibliography[heading=published, filter=published]

Some more information

1) bibtex as backend is used here on purpose (so that texi2pdf runs biblatex automatically)

2) This problem comes from a CV. The idea is to use \nocite{*} (and not specific \cite{...}s so that I don't have to care about updating the references).

3) In the CV, I show categories "In preparation", "Submitted", "Published", "Book contributions", "Books". I use the following filtering to get this:

\defbibfilter{inpreparation}{type=article and keyword=inpreparation}
\defbibfilter{submitted}{type=article and keyword=submitted}
\defbibfilter{published}{type=article and keyword=published}
\defbibfilter{bookcontrib}{type=incollection and ( keyword=inpreparation or keyword=submitted or keyword=published )}
\defbibfilter{book}{type=book and ( keyword=inpreparation or keyword=submitted or keyword=published )}

1 Answer 1


The first solution mentioned doesn't work because your bibliography is split by keywords, not by reference sections. The general approach still applies provided that you make the counters keyword-specific.



This format has a few limitations:

  • It only applies to keyword filtering, not more general filters defined via \defbibfilter.
  • The item label width corresponds to \labelnumberwidth. This length is successively increased to accommodate the largest labelnumber based on all entries in the bbl file. So if the keywords filter out many entries, you may find the width too large.

If you don't intend to use the labelnumbers in citations (e.g. entries are accessed only via \nocite), then a simple solution to the above limitations is to patch \printbibligraphy. The following example demonstrates this approach. It also prints entries in the authoryear style.


\defbibfilter{primary}{type=article and keyword=primary}
\defbibfilter{other}{not type=article and not type=manual and not keyword=secondary}




  author = {Glashow, Sheldon},
  title = {Partial Symmetries of Weak Interactions},
  journaltitle = {Nucl.~Phys.},
  volume = {22},
  date = {1961},
  pages = {579--588},
  keywords = {stdmodel,primary}}
  author = {Weinberg, Steven},
  title = {A Model of Leptons},
  journaltitle = {Phys.~Rev.~Lett.},
  volume = {19},
  date = {1967},
  pages = {1264--1266},
  keywords = {stdmodel,primary}}
  author = {Salam, Abdus},
  editor = {Svartholm, Nils},
  title = {Weak and Electromagnetic Interactions},
  booktitle = {Elementary particle theory},
  booktitleaddon = {Proceedings of the Eighth Nobel Symposium},
  location = {Stockholm},
  date = {1968},
  pages = {367--377},
  keywords = {primary,stdmodel}}
  author = {Augustine, Robert L.},
  title = {Heterogeneous catalysis for the synthetic chemist},
  publisher = {Marcel Dekker},
  location = {New York},
  date = {1995},
  keywords = {secondary}}
  title = {Information Theory and Statistics},
  author = {Kullback, Solomon},
  year = {1959},
  publisher = {John Wiley \& Sons},
  location = {New York}}

\printbibliography[filter=primary,title={Primary articles}]
\printbibliography[filter=secondary,title={Secondary works},resetnumbers]
\printbibliography[filter=other,title={Other works},resetnumbers]
  • Thanks, Audrey. Unfortunately, it does not compile (Ubuntu 12.10, TeXLive 2012, texi2pdf). 1) Is it crucial to have biber as backend? I used bibtex (see Update), but I obtain output containing Database file #1: foo-blx.bib Database file #2: biblatex-examples.bib ... 2) The whole problem is part of a CV (see the update above). My fear with your solution (although I can't try) is that the numbering is relative to all \nocite{*} "entries" and not just counts the entries shown in the bibliography. I definitely wouldn't want having to \cite{} all entries by hand. Feb 11, 2013 at 7:10
  • Okay, let me try some things... I get back to you ... Feb 11, 2013 at 7:27
  • The problem is biblatex-examples.bib where texi2pdf exits abnormally. For my own .bib, compiling works well and the numbers are decreasing. However, they are still not correct, the reason being that my filters are of the form type=article and keyword=primary, not just keyword=primary (or even type=incollection and ( keyword=primary or keyword=secondary )). For example, you don't want to mix books and articles (=> filter different types as well). Because of this subsetting, some of the numbers are missing. Is there a solution to that? Feb 11, 2013 at 7:49
  • Another problem is the numeric style: How does one get the years printed as for the authoryear style (right after the authors' names)? Feb 11, 2013 at 8:29
  • @MariusHofert So you're filtering by type and keyword? Anything else? A solution relies on exactly how you're splitting the bibliographies. Without accurate information on this, I can't offer a solution. You should have no problem using BibTeX. You can also use \nocite{*}, but again if your bib file is large relative to the number of printed entries \labelnumberwidth is going to be too wide. There are ways around this, but I need more details on the filters.
    – Audrey
    Feb 11, 2013 at 14:22

You must log in to answer this question.

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