TransWikia.com

Resetting bibliography numbering using multibib and moderncv

TeX - LaTeX Asked on May 26, 2021

I have two files, art1.bib:

@article{article1,
  title={Journal Article},
  author={Man},
  year={2014},
  journal={Journal}
}

and conf1.bib:

@article{magazine1,
  title={Magazine Article},
  author={Woman},
  year={2014},
  journal={Magazine}
}

When I compile the file mwe.tex:

documentclass[12pt,a4paper,sans]{moderncv} 
moderncvstyle{classic}
usepackage[scale=0.75]{geometry}

firstname{Hi}
familyname{There}

makeatletter
renewcommand*{bibliographyitemlabel}{@biblabel{arabic{enumiv}}}
makeatother
renewcommand*{bibliographyitemlabel}{[arabic{enumiv}]}
usepackage{multibib}
newcites{art,conf}{{Articles},{Conferences}}
begin{document}
makecvtitle

section{Publications}
nociteart{*}
bibliographystyleart{plain}
bibliographyart{art1}
nociteconf{*}
bibliographystyleconf{plain}
bibliographyconf{conf1}    
end{document}

I get this:

enter image description here

How to reset the numbering so the second bibliography will start from 1 as well?

One Answer

You simply have to load multibib with the option resetlabels:

usepackage[resetlabels]{multibib}

MWE:

documentclass[12pt,a4paper,sans]{moderncv}
moderncvstyle{classic}
usepackage[scale=0.75]{geometry}

firstname{Hi}
familyname{There}

makeatletter
renewcommand*{bibliographyitemlabel}{@biblabel{arabic{enumiv}}}
makeatother
renewcommand*{bibliographyitemlabel}{[arabic{enumiv}]}
usepackage[resetlabels]{multibib}
newcites{art,conf}{{Articles},{Conferences}}
begin{document}
makecvtitle

section{Publications}
nociteart{*}
bibliographystyleart{plain}
bibliographyart{art1}
nociteconf{*}
bibliographystyleconf{plain}
bibliographyconf{conf1}
end{document} 

Output

enter image description here

Correct answer by karlkoeller on May 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP