In the natbib documentation it states:
These functions are available only to numerical-mode citations, and
only when used parenthetically, similar to the restrictions on sort and
compress.
They also require special .bst files, as provided for example by the
American Physical Society for their REVTEX class.
If I use the following file with a revtex4.1 bst file I get the right output:
\documentclass{article}
\usepackage[sort&compress,numbers,merge]{natbib}
\bibliographystyle{apsrev4-1}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{Cundall-1979,
author = {Cundall, P. A. and Strack, O. D. L.},
title = {A discrete numerical model for granular assemblies},
journal = {G\'eotechnique},
year = {1979},
volume = {29},
pages = {47--65},
number = {1}}
@ARTICLE{Haff-1986,
author = {Haff, P. K. and Werner, B. T.},
title = {Computer simulation of the mechanical sorting of grains},
journal = {Powder Technology},
year = {1986},
volume = {48},
pages = {239--245},
number = {3}}
@ARTICLE{Jaeger-1996,
author = {Jaeger, H. M. and Nagel, S. R.},
title = {Granular solids, liquids, and gases},
journal = {Reviews of Modern Physics},
year = {1996},
volume = {68},
pages = {1259--1273},
number = {4}}
\end{filecontents}
\begin{document}
In \citep{Cundall-1979, *Haff-1986, Jaeger-1996} and
\bibliography{\jobname}
\end{document}
If you're writing the bibliography yourself, then you need to add a label for each item. Right click the grey box in the reference list where the citation key is written - highlighted by the red ellipse in the screenshot below - and choose Settings (the only option).
In the Label field write authorname(year)
without a space before the parenthesis, e.g. Author(2012)
. Quoting the natbib
manual:
oneself, such that it conforms to natbib.
This syntax looks as follows:
\bibitem[Jones et al.(1990)]{jon90}...
or alternatively
\bibitem[Jones et al.(1990)Jones, Baker, and Williams]{jon90}...
The text in square brackets contains the pieces of citation texts, the
short author list, Jones et al.
, the year 1990
, and the optional long
author list Jones, Baker and Williams
. If the long list is missing,
the short list will be used instead. The parentheses around the year
are not part of the text, but merely delimit the year from the author
lists. Round parentheses must always be used, even if square brackets
are wanted for the citations. And there must be no space before or
after the year parentheses, else it will become part of the author
list.
Best Answer
Switched the comment of Bonni to an answer
The latest version of
apacite
with the optionnatbibapa
is able to solve this problem. It follows the commands ofnatbib
so no need for major restructuring in the main document. Unfortunately, the optionnatbibapa
currently has a bug that can be solved by following the instructions in the post New apacite package (2012-Feb-14) problem?. Anyway, I hope this helps some people with similar problem.