9

I want my bibliography to be display last names before first names, instead of first name, last name. How do I do that in an article document class, the natbib citation management package, and the plainnat bibliography style? Do I have to change entries in my bibtex file or is there a command for that?

This is what my bibtex entries look like so far:

@article{battin2009boundless,
  title={The boundless carbon cycle},
  author={Battin, Tom J and Luyssaert, Sebastiaan and Kaplan, Louis A and Aufdenkampe, Anthony K and Richter, Andreas and Tranvik, Lars J},
  journal={Nature Geoscience},
  volume={2},
  number={9},
  pages={598--600},
  year={2009},
  publisher={Nature Publishing Group}
}

Bibtex example

How can I change it to 'Battin, T.J. ....'?

Here´s (hopefully) my minimum working example:

\documentclass[12pt]{article}
\usepackage[round]{natbib}
\usepackage[nottoc,numbib]{tocbibind}

\begin{document}

\cite{battin2009boundless}

\bibliographystyle{plainnat}
\bibliography{mybib}

\end{document}

bibtex file:

@article{battin2009boundless,
  title={The boundless carbon cycle},
  author={Battin, Tom J and Luyssaert, Sebastiaan and Kaplan, Louis A and Aufdenkampe, Anthony K and Richter, Andreas and Tranvik, Lars J},
  journal={Nature Geoscience},
  volume={2},
  number={9},
  pages={598--600},
  year={2009},
  publisher={Nature Publishing Group}
}
Mico
  • 506,678
  • Can you please add a minimal working example with bibliography (MWEB)? Also would you be willing to switch to biblatex? – samcarter_is_at_topanswers.xyz Jun 17 '17 at 12:08
  • Something like this? :\documentclass[12pt]{article} \usepackage[round]{natbib} \usepackage[nottoc,numbib]{tocbibind} \begin{document} \cite{battin2009boundless} \bibliographystyle{plainnat} \bibliography{mybib} \end{document} bibtex file: @article{battin2009boundless, title={The boundless carbon cycle}, author={Battin, Tom J and Luyssaert, Sebastiaan and Kaplan, Louis A and Aufdenkampe, Anthony K and Richter, Andreas and Tranvik, Lars J}, journal={Nature Geoscience}, volume={2}, number={9}, pages={598--600}, year={2009}, publisher={Nature Publishing Group} } – user133467 Jun 17 '17 at 12:22
  • I wouldn´t mind switching but I don´t know how and I only use bibtex because I worked with natbib. As long as I get the results I´m looking fore I wouldn´t mind switching (can you tell me how)? – user133467 Jun 17 '17 at 12:28
  • I've taken the liberty of editing the first sentence of your posting to clarify that it's the ordering of the names within an entry, and not the sorting of the entries themselves, that you wish to change. – Mico Jun 17 '17 at 16:25

3 Answers3

7

You need to change a single line in the bibliography style file to achieve your formatting objective. I suggest you proceed as follows:

  • Locate the file plainnat.bst in your TeX distribution. Make a copy of this file, and call the copy, say, plainnat-reversed.bst. (Do not edit an original file of the TeX distribution directly.

  • Open the file plainnat-reversed.bst in a text editor. The text editor program you use to edit your tex files will do fine.

  • In the file plainnat-reversed.bst, locate the function format.names. (It starts on line 216 in my copy of the file.)

  • Inside this function, locate the following line:

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

    Change this line to

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

    If you also want to truncate the given names to just their initials, change the line to

        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=
    
  • Save the file plainnat-reversed.bst either in the directory where you main tex file is located or in a directory that's searched by BibTeX. If you choose the second option, be sure to update the filename database of your TeX distribution suitably.

  • In your main tex file, change the instruction \bibliographystyle{plainnat} to \bibliographystyle{plainnat-reversed}. Rerun LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

Happy BibTeXing!

A full MWE:

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@article{battin2009boundless,
  title={The boundless carbon cycle},
  author={Battin, Tom J. and Luyssaert, Sebastiaan and Kaplan, Louis A. and Aufdenkampe, Anthony K. and Richter, Andreas and Tranvik, Lars J.},
  journal={Nature Geoscience},
  volume={2},
  number={9},
  pages={598--600},
  year={2009},
  publisher={Nature Publishing Group}
}
\end{filecontents}

\documentclass[12pt]{article}
\usepackage[round]{natbib}
\bibliographystyle{plainnat-reversed}

\begin{document}
\cite{battin2009boundless}
\bibliography{mybib}   
\end{document}
Mico
  • 506,678
4

based on https://tex.stackexchange.com/a/112341/36296 and comments from moewe

You can mimic a similar style in biblatex

\documentclass{article}

\usepackage{filecontents} %only for this example
\begin{filecontents}{\jobname.bib}
@article{battin2009boundless,
  title={The boundless carbon cycle},
  author={Battin, Tom J and Luyssaert, Sebastiaan and Kaplan, Louis A and Aufdenkampe, Anthony K and Richter, Andreas and Tranvik, Lars J},
  journal={Nature Geoscience},
  volume={2},
  number={9},
  pages={598--600},
  year={2009},
  publisher={Nature Publishing Group}
}
\end{filecontents}

\usepackage[%
    style=authoryear,
    giveninits=true,
    natbib=true,
    maxbibnames=99,
    uniquename=init
]{biblatex}

\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\multinamedelim}{\addcomma\space}
\renewcommand*{\finalnamedelim}{\addcomma\space}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\setlength{\bibitemsep}{\baselineskip}
\renewbibmacro{in:}{}

\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

(in case the exact formatting of page numbers etc. is important to you, they can be done exactly as in your example, just a bit of extra work)

  • 4
    I'd prefer \renewcommand\nameyeardelim{\addcomma\space} over \renewcommand\nameyeardelim{, }. Additionally \DeclareNameAlias{sortname}{family-given} is the new version of \DeclareNameAlias{sortname}{last-first}. style=authoryear-comp, citestyle=authoryear can be shortened to style=authoryear. – moewe Jun 17 '17 at 15:37
  • Thank you for updating your answer, unfortunately one can't upvote twice. – moewe Jun 17 '17 at 15:53
  • 1
    @moewe Sorry for stealing the opportunity for your 1000th answer! – samcarter_is_at_topanswers.xyz Jun 17 '17 at 15:54
  • Uhhh, I hadn't noticed... – moewe Jun 17 '17 at 15:56
  • @moewe please enjoy writing your next answer! – samcarter_is_at_topanswers.xyz Jun 17 '17 at 15:58
  • So if I understood your example right than I have to load all my bibtex files now into my actual document right before I start it? And than use that code to switch order of the last name? – user133467 Jun 17 '17 at 16:15
  • 1
    @niygoo No, just use the .bib file you already have, \begin{filecontents}....\end{filecontents} was just to generate this example as I don't have your bib file. You have to change \addbibresource{\jobname.bib} to the actual name of your .bib file and then compile with pdflatex->biber->pdflatex->pdflatex. – samcarter_is_at_topanswers.xyz Jun 17 '17 at 17:56
0

You can do this straightforwardly using bibtex and natbib by first putting the following line in the preamble:

\usepackage{sort,numbers}{natbib}

and then putting the following bibliographystyle command just before your \bibliography command:

\bibliographystyle{apalike}

This gives output that looks like this:

Example of using numbers option with apalike style

  • 2
    I think you should make it clearer to readers that what your proposed solution does is to replace the OP's preferred bibliography style, plainnat, with apalike. This approach may "solve" the issue of placing given names after surnames, but it also takes a very different approach to formatting the bibliographic entries. – Mico Sep 15 '22 at 13:50