6

Citing \cite{paper1,paper2,paper3}, with the apalike style, some papers of a same author gives me something like

[LastName, 2001, LastName, 2002, LastName, 2003]

I would prefer something like this:

[LastName, 2001, 2002, 2003]

Thank you for any suggestions.

Václav Pavlík
  • 1,353
  • 11
  • 18
f10w
  • 791
  • Please, include here the corresponding entries from your .bib file. I may have the solution, but I have to know, if it is relevant in your case. – Václav Pavlík Oct 03 '14 at 11:26

1 Answers1

7

The citation format you want is already defined in apalike, unless you modified the style. Try the following and if it does not help, maybe update your natbib package.

In mybib.bib I have three entries from different years, where the first two have the same authors and the third is modified:

@article{jd12,
  author={Doe, J. and Bar, F. and Smith, J.},
  title={Some title 1},
  journal={Some journal},
  year={2012},
}

@article{jd13, author={Doe, J. and Bar, F. and Smith, J.}, title={Some title 2}, journal={Some journal}, year={2013}, }

@article{jd14, author={Doe, J. and Simpson, H. and Bar, F.}, title={Some title 3}, journal={Some journal}, year={2014}, }

Now for the main document:

\documentclass[12pt]{report}
\usepackage{natbib}

\begin{document}

Cite the first pair normally \cite{jd12,jd13}, then the second pair in text \citet{jd13,jd14} and now the first and the third in brackets \citep{jd12,jd14}.

We can also cite them all at once, e.~g. in brackets \citep{jd12,jd13,jd14}, or switch them \citet{jd14,jd12,jd13}.

\bibliographystyle{apalike} \bibliography{mybib}{}

\end{document}

Which will give this as output:

text bib

EDIT from Ansa211:

You can even define custom commands that make use of the merged list of authors; for example, if you often find yourself writing \citeauthor{X}'s \citeyearpar{X}, you can add this to your preamble:

citehis

Václav Pavlík
  • 1,353
  • 11
  • 18
  • Works perfectly. To get exactly the same format than before, I used \usepackage[square]{natbib} and changed \cite{} to \citep{}. Thank you! – f10w Oct 03 '14 at 12:37
  • It also works with \bibliographystyle{apa}. – Ansa211 Feb 05 '18 at 09:50