5

I am having problem of how to reset numbering for different types of references. I used biblatex in combination with modernCV. The reference list is divided into "journal papers" and "conference papers". However the numbering that appeared goes like this for journal papers : 1, 2, 4, 5 and for conference papers: 3. The desired numbering goes like this for journal papers : 1, 2, 3, 4 and for conference papers: 1. Any suggestion would be greatly appreciated.

\documentclass{moderncv}
\usepackage[defernumbers=true, backend=bibtex, maxbibnames=99,doi=false,isbn=false,url=false,sorting=ydnt]{biblatex}
\defbibnote{pro}{}
\defbibnote{ar}{}
\bibliography{myPub} 

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{% label format from numeric.bbx
        \printfield{prefixnumber}%
        \printfield{labelnumber}}}
     {\setlength{\topsep}{0pt}% layout parameters from moderncvstyleclassic.sty
      \setlength{\labelwidth}{\hintscolumnwidth}%
      \setlength{\labelsep}{\separatorcolumnwidth}%
      \leftmargin\labelwidth%
      \advance\leftmargin\labelsep}%
      \sloppy\clubpenalty4000\widowpenalty4000}
  {\endlist}
  {\item}

\moderncvstyle{oldstyle}  
\moderncvcolor{blue}       
\firstname{John}
\familyname{Doe}

\begin{document}
\makecvtitle

\nocite{*}
\printbibliography[prenote=ar, type=article, title={Articles},resetnumbers=true]
\printbibliography[prenote=pro, type=inproceedings, title={Conference proceedings},resetnumbers=true] 
\end{document}
2
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. As it stands, your issue cannot be reproduced by anybody without a copy of myPub.bib. You should add an example set of entries which can be used to reproduce the issue. However, if you do not redefine the bibliography environment, delete the generated files (.aux, .bbl etc.) and recompile, does it work better?
    – cfr
    Jan 6 '15 at 3:25
  • This works fine for me. You need to compile it a couple of times after running bibtex to get the numbers right.
    – Alan Munn
    Jan 6 '15 at 3:29
2

The sorting and renumbering takes (at least) two latex compilations after running bibtex to get the numbers sorted out properly.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.