Now that you pointed us at the correct bib
style to modify here is a much shorter replacement for format.lab.names
:
FUNCTION {format.lab.names}
{ 's :=
s num.names$ 'numnames :=
s #1 "{vv~}{ll}" format.name$
numnames #1 >
{ s #2 "{vv~}{ll}" format.name$ 't :=
numnames #2 >
t "others" =
or
{ " et~al." * }
{ " and " * t * }
if$
}
'skip$
if$
}
On your sample file (slightly tidied, see below) it produces
The function works as follows. First store the list of authors in s
. Store the number of authors in numnames
. Format the first (#1
) entry and output it. Then if there is more than one name, format the next name and assign it to t
. If t
was "others"
or there actually are more than two authors output et al.
others output the second (final) author preceeded by and
.
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{abd:2007,
author = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold",
title = "Roughing it up: {Including} jump components in the
measurement, modeling and forecasting of return volatility",
journal = "Review of Economics and Statistics",
year = 2007,
volume = 89,
number = 4,
month = "November",
pages = "701--720",
}
@article{abde:2001,
author = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold
and Heiko Ebens",
title = "The distribution of realized stock return volatility",
journal = "Journal of Financial Economics",
year = 2001,
volume = 61,
number = 1,
month = "July",
pages = "43--76",
}
@unpublished{gavazzoni-santacreu-2015,
Author = {Gavazzoni, Federico and Ana Maria Santacreu},
Note = {manuscript, December},
Title = {International R\&D spillovers and Asset prices},
Year = {2015}
}
@article{segal-shaliastovich-yaron-2013,
Author = {Gill, Segal and Ivan Shaliastovich and Amir Yaron},
Journal = {Journal of Financial Economics},
Title = {Good and bad uncertainty: macroeconomic and financial market implications},
Volume={117},
Pages={369-397},
Year = {2015}
}
\end{filecontents*}
\usepackage[round,authoryear,comma]{natbib}
\bibliographystyle{jf1} % or: jf3
\begin{document}
Here's the output
\cite{abd:2007}
\cite{abde:2001}
\cite{gavazzoni-santacreu-2015}
\cite{segal-shaliastovich-yaron-2013}
\bibliography{\jobname}
\end{document}
Unfortunately, there is no canonical solution here. The base BibTeX styles were written back in the late eighties when URLs and electronic journal publishing were not really a thing and journal articles and conference proceedings mostly had page numbers, so there was no need to mark up "article numbers" or "paper numbers".
Since the core styles have no provision for this, many contributed styles also don't — and if they have something, they roll their own solution; there is no standard that would encompass more styles than that of a family or of the same author.
biblatex
knows the eid
field, but even there I can't promise that all contributed styles make use of it as intended.
You will have to decide if the output looks OK on a case-by-case basis, I'm afraid.
As it so happens, you mention IEEEtran
which has a paper
field for @inproceedings
that can be used here. That field is by no means universal and I have not seen it before, but it should hopefully give the expected output here.
Best Answer
The linked style was generated for 'standard' BibTeX use with the LaTeX kernel's
\cite
, and not withnatbib
. As such, you should look at generating a new.bst
file usingcustom-bib
or considering switching tobiblatex
.