I'm using biom.bst to reference papers in LaTeX. If I have two references to two different papers with exactly the same authors on the same year, the reference is correctly formatted in the citation and in the bibliography to disambiguate using an 'a' and 'b' appended to the year:
For example, if the .bib file contains:
@article{sumner2012a,
author={Sumner, Jeremy G. and Fern{\'a}ndez-S{\'a}nchez, J. and Jarvis, P.D.},
title={Lie Markov Models},
year = {2012}
}
@article{sumner2012b,
author={Sumner, Jeremy G. and Fern{\'a}ndez-S{\'a}nchez, J. and Jarvis, P.D.},
title={Some other paper with exact same authors in same year},
year = {2012}
}
And I cite both papers like this:
\citep{sumner2012a} \citep{sumner2012b}
The citation appears correctly with 'a' and 'b' like this:
(Sumner et al., 2012a) (Sumner et al., 2012b)
And the bibliography is also formatted correctly with 'a' and 'b':
Sumner, J. G., Fernández-Sánchez, J., and Jarvis, P. (2012a).
Lie markov models.
Sumner, J. G., Fernández-Sánchez, J., and Jarvis, P. (2012b).
Some other paper with exact same authors in same year.
The problem is when the lead author is the same, the year is the same, but secondary authors are different. For example, if the .bib file contains (same lead author Sumner but different secondary authors):
@article{sumner2012a,
author = {Sumner, Jeremy G. and Jarvis, Peter D. and Fern{\'a}ndez-S{\'a}nchez, Jes{\'u}s and Kaine, Bodie T. and Woodhams, Michael D. and Holland, Barbara R.},
title = {Is the General Time-Reversible Model Bad for Molecular Phylogenetics?},
year = {2012}
}
@article{sumner2012b,
author={Sumner, Jeremy G. and Fern{\'a}ndez-S{\'a}nchez, J. and Jarvis, P.D.},
title={Lie Markov Models},
year = {2012}
}
The 'a' and 'b' letters do not appear, so the citations are ambiguous:
(Sumner et al., 2012) (Sumner et al., 2012)
Sumner, J. G., Fernández-Sánchez, J., and Jarvis, P. (2012).
Lie Markov Models
Sumner, J. G., Jarvis, P. D., Fernández-Sánchez, J., Kaine, B. T., Woodhams, M. D., and Holland, B. R. (2012).
Is the general time-reversible model bad for molecular phylogenetics?
I think I've narrowed down the part of the BST file which prints the year and disambiguating letter (called extra.label):
FUNCTION {output.year.check}
{ year empty$
{ "empty year in " cite$ * warning$ }
{ write$
" (" year * extra.label * ")" *
mid.sentence 'output.state :=
}
if$
}
And possibly these functions:
FUNCTION {initialize.extra.label.stuff}
{ #0 int.to.chr$ 'last.label :=
"" 'next.extra :=
#0 'last.extra.num :=
}
FUNCTION {forward.pass}
{ last.label label =
{ last.extra.num #1 + 'last.extra.num :=
last.extra.num int.to.chr$ 'extra.label :=
}
{ "a" chr.to.int$ 'last.extra.num :=
"" 'extra.label :=
label 'last.label :=
}
if$
}
FUNCTION {reverse.pass}
{ next.extra "b" =
{ "a" 'extra.label := }
'skip$
if$
label extra.label * "}" * 'label :=
extra.label 'next.extra :=
}
EXECUTE {initialize.extra.label.stuff}
ITERATE {forward.pass}
REVERSE {reverse.pass}
But I have absolutely no idea how this code works or how to fix this bug. I essentially need it to check if just the first author is the same when determining if it needs to print the extra.label, instead of checking if ALL the authors are the same. Any suggestions?
Minimal working example, demonstrating what works (Tumner) and what doesn't (Sumner). The class file obtained from http://www.biometrics.tibs.org/biom.cls.txt.
\documentclass[useAMS,usenatbib]{biom}
\usepackage{filecontents}
\begin{filecontents}{biblio.bib}
@article{sumner2012a,
author = {Sumner, Jeremy G. and Jarvis, Peter D. and Fern{\'a}ndez-S{\'a}nchez, Jes{\'u}s and Kaine, Bodie T. and Woodhams, Michael D. and Holland, Barbara R.},
title = {Is the General Time-Reversible Model Bad for Molecular Phylogenetics?},
year = {2012}
}
@article{sumner2012b,
author={Sumner, Jeremy G. and Fern{\'a}ndez-S{\'a}nchez, J. and Jarvis, P.D.},
title={Some other paper with exact same authors in same year},
year = {2012}
}
@article{tumner2013c,
author = {Tumner, Jeremy G. and Jarvis, Peter D.},
title = {Is the General Time-Reversible Model Bad for Molecular Phylogenetics?},
year = {2013}
}
@article{tumner2013d,
author={Tumner, Jeremy G. and Jarvis, Peter D.},
title={Some other paper with exact same authors in same year},
year = {2013}
}
\end{filecontents}
\title[Title]{Title}
\author{Jane Author$^*$\email{ja@noreply.com}}
\begin{document}
\date{{\it Received June} 2018. {\it Revised October} 2018. {\it
Accepted December} 2018.}
\pagerange{\pageref{firstpage}--\pageref{lastpage}}
\volume{100}
\pubyear{2018}
\artmonth{December}
\doi{10.1111/j.1541-0420.2005.00454.x}
\begin{abstract}
Abstract
\end{abstract}
\maketitle
\label{firstpage}
\section{Introduction}
\citep{sumner2012a} \citep{sumner2012b}
\citep{tumner2013c} \citep{tumner2013d}
\backmatter
\bibliographystyle{biom}
\bibliography{biblio}
\label{lastpage}
\end{document}
biblatex
usage orbibtex
for example?