[Tex/LaTex] How to edit in-text citation in plainnat style

citingnatbib

I manage my bibliography with JabRef and everything is OK but I have a problem with my plainnat.bst file. Possibly, I want my in-text citation to be like: [Author et al., year] or [Autor, Autor et al., year] when authors are more than 2.

I think I have to change the FUNCTION {format.lab.names} code but I don't know how to do it. Can you please help me ?

This is my code (plainnat default):

FUNCTION {format.lab.names}
{ 's :=
  s #1 "{vv~}{ll}" format.name$
  s num.names$ duplicate$
  #2 >
  al    { pop$ " et~al." * }
  { #2 <
    'skip$
    { s #2 "{vv }{ll}" format.name$ "others" =
        { " et~al." * }
        { " e " * s #2 "{vv~}{ll}" format.name$ * }
      if$
    }
  if$
}
if$
}

Yes, Mario, you are perfecly right…I just forgot to say that I'm already using natbib!

However, today I've been editing my plainnat.bst file and I managed to write author's name in smallcaps, year of articles in bold and right now my in-text citation looks like this (I would have posted a picture but I don't have 10 reputations yet):

[Imperi, F. et al., 2009]

and in the bibliography:

Imperi, F., Ciccosanti, F., Basulto Perdomo, A., Tiburzi, F., Mancone, C., Alonzi, T., Ascenzi, P., Piacentini, M., Visca, P., e Fimia, G.M. Analysis of the periplasmic proteome of Pseudomonas aeruginosa, a metabolically versatile opportunistic pathogen. Proteomics, 9:1901–1915, 2009. (Citato alle pagine 1, 5, e 6.)

I'm nearly satisfied with it, but I just want to know if there's a way to add also the second name of this (and every) article in the in-text citations, like:

[Imperi, F., Ciccosanti, F. et al., 2009]

Best Answer

You can solve this by using the natbib package:

For example:

\documentclass{article}

\usepackage[english]{babel}
\usepackage{url}
\usepackage{natbib}

\begin{document}
According to \citep{mario2013}

\bibliographystyle{plainnat}
\bibliography{refs}

\end{document}

where the refs.bib file is:

@article{mario2013,
author={mario},
title={Marito and Friends},
journal={My Journal},
year = {2013},
}

Will produce an output like this:

enter image description here

For more information please read the natbib documentation.

Related Question