4

Since I'm a bit of a freak, I would like to enumerate the entries in my bibliography starting with [0] (rather than with [1]). Here is the relevant excerpt from my file:

\documentclass[10pt,conference]{IEEEtran}
\usepackage[backend=biber,bibstyle=ieee,citestyle=numeric-comp,sortcites=true,maxnames=99]{biblatex}
\renewcommand*{\bibfont}{\footnotesize}
\renewcommand*{\biblabelsep}{\labelsep}
\addbibresource{whatever.bib}
....
\begin{document}
...
\printbibliography
...
\end{document}

A solution Change bibliography starting number is constructed explicitly for article.cls, but there is none for ieeetran. Any help?

  • It is not required to ask questions with a working code example (even though it almost always helps to make the question a little better), but I think if you provide code that looks like an MWE it should be an MWE. I suggest you remove the ... as they don't add anything (except for an error), replace whatever.bib with biblatex-examples.bib and actually \cite a few example entries. This makes it easier for people like me to get started: I always test my suggestions in an example document. Usually I can just copy the MWE and am good to go, but here I had to modify stuff before I could. – moewe Aug 22 '18 at 03:59
  • 1
    For future visitors and because it is so prominently mentioned in the title, let me mention that IEEEtran is a publisher class. As such it probably only makes sense to use it when publishing with the IEEE, in that case you should normally be using the BibTeX .bst styles of the IEEEtran package (or manual thebibliography if you like that sort of thing) and not biblatex. Most publishers can not handle biblatex submissions. If you are not publishing with the IEEE you may want to consider using a simpler document class altogether. – moewe Aug 22 '18 at 11:00
  • The linked answer did not work because it was about thebibliography, which is not used by and (basically) incompatible with biblatex. The document class could theoretically play a role here, but was not the major issue. – moewe Aug 22 '18 at 11:02
  • Check this. https://latex.org/forum/viewtopic.php?t=15487 – Nirmal Aug 20 '22 at 06:08

1 Answers1

4

The naive solution just redefines the field format for labelnumber to subtract one. That leaves us with labels starting at 0.

\DeclareFieldFormat{labelnumber}{\the\numexpr#1-1\relax}

The citation reads "0-2", the bibliography entries are labelled "0.", "1.", "2", ...

Alternatively, you can use the proper interfaces to do this.

  • Load biblatex with the option defernumbers
  • Then call \printbibliography with the option resetnumbers=0

\documentclass[10pt,conference]{IEEEtran}
\usepackage[backend=biber, defernumbers, 
  bibstyle=ieee, citestyle=numeric-comp, maxnames=99]{biblatex}
\renewcommand*{\bibfont}{\footnotesize}
\renewcommand*{\biblabelsep}{\labelsep}
\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,worman,geer}
\printbibliography[resetnumbers=0]
\end{document}

The documentation warns about resetnumbers:

Use this option with care as biblatex can not guarantee unique labels globally if they are reset manually.

In this case you should be fine, especially if you only have one bibliography at the end.

If you play around with resetnumbers you may have to delete all auxiliary files and recompile from scratch if you change the values, because old settings can live on in the .aux file.

moewe
  • 175,683