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 theeditor
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 functionformat.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
Change this string to
You can probably guess what moving
ff
from the start to the end of thenameptr
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!