[Tex/LaTex] bibliographystyle{plainnat} – citations and multicitations problem

bibtexcitingnatbib

I'm having two main problems with my master thesis citations.
I’m using JabRef for building my bib file.

For example I have the following authors in the bib file:

1.

Author  = {{Silva, Peter}},
Year = {2009},

2.

Author  = {{Cash, John and Lucas, George and Noah, Steve }},
Year = {2012},

Problem 1:

In the master thesis, text each time I want to cite one author I would like the format to be: last name (year). For the first case it would show: Silva (2009).

At the end of the thesis when the full bibliography is listed it would show: Silva, Peter, 2009.

Problem 2:

In the master thesis, text each time I want to cite more than two authors I would like the format to be: last name of first author et al. (year). For the second case it would show: Cash et al. (2012).

At the end of the thesis when the full bibliography is listed it would show: Cash, John and Lucas, George, and Noah, Steve, 2012.

Best Answer

As you've confirmed in a comment, implementing @egreg's suggestion and getting rid of the extra pair of curly braces around the author fields (and around the editor fields too, while you're at it) lets LaTeX and BibTeX generate the desired citation call-out format.

To address the second issue -- listing the authors' full names as "Surname, FirstName" rather than as "FirstName Surname" -- it's necessary to modify the bibliography style file slightly. Fortunately, the required modification is straightforward.

  • Start by finding the file plainnat.bst on your system. (If you have TeXLive or MikTeX, typing "kpsewhich plainnat.bst" at a command prompt should tell you where the file is located.) Make a copy of this file, and name the copy (say) revplainnat.bst.

  • Open revplainnat.bst in a text editor, and find the function format.names. (It starts on line 216 in my copy of the file.)

  • A few lines down from the start of the function, locate the instruction

        { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
    
  • Change this string to

        { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
    

    You can probably guess what moving ff from the start to the end of the nameptr string does.

  • Save the file revplainnat.bst, either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the second method, be sure to update the filename database of your TeX distribution.

  • Start using the new bibliography style by replacing \bibliographystyle{plainnat} with \bibliographystyle{revplainnat} and re-running LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

Happy BibTeXing!


enter image description here

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{newtest.bib}
@misc{pub1,
  Author = {Silva, Peter}, 
  Year   = {2009},
}
@misc{pub2,
  Author = {Cash, John and Lucas, George and Noah, Steve }, 
  Year   = {2012},
}
\end{filecontents}

\usepackage[authoryear]{natbib}
\bibliographystyle{revplainnat}

\begin{document}
\cite{pub1}

\cite{pub2}

\bibliography{newtest}
\end{document}