1

I would like to format my references according to the following specifications:

Author: Surname, Initials, Co-authors: Initials, Surname

I am using natbib, abbrvnat for bibliography style and I guess I have to edit the .bst file (FUNCTION {format.names}).

I would appreciate if someone could help me with this or recommend something else.

1

To get the desired ordering of authors' first and last names, I suggest you do the following:

  • Find the file abbrvnat.bst in your TeX distribution. Make a copy of this file and name the copy, say, myabbrvnat.bst. (Don't edit a file from the TeX distribution directly.

  • Open the file myabbrvnat.bst in a text editor; the editor you use to edit your tex files will do fine.

  • Find the function format.names in the file. (In my copy of the file, this function starts on line 216. Delete all 27 or so lines of function; the last line will contain just a right curly brace, }.

  • Insert the following code chunk in the place of the deleted function:

    FUNCTION {format.names}
    { duplicate$ empty$ 'skip$ {
      's :=
      "" 't :=
      #1 'nameptr :=
      s num.names$ 'numnames :=
      numnames 'namesleft :=
        { namesleft #0 > }
        { s nameptr
          duplicate$ #1 >
            { "{f.~}{vv~}{ll}{, jj}" }
            { "{vv~}{ll}{, f.}{, jj}" }
          if$
          format.name$
          't :=
          nameptr #1 >
            {
              namesleft #1 >
                { ", " * t * }
                {
                  s nameptr "{ll}" format.name$ duplicate$ "others" =
                    { 't := }
                    { pop$ }
                  if$
                  "," *
                  t "others" =
                    { " et~al." * }
                    { " " * t * }
                  if$
                }
              if$
            }
            't
          if$
          nameptr #1 + 'nameptr :=
          namesleft #1 - 'namesleft :=
        }
      while$
      } if$
    }
    

    Do note that I've interpreted your specification as indicating that there should be no "and" connector word before the final author in the author list.

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

  • Start using the new bibliography style by replacing the instruction \bibliographystyle{abbrvnat} with \bibliographystyle{myabbrvnat}. Be sure to run LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

Here's an example file:

enter image description here

\documentclass{article}
\usepackage[numbers]{natbib}
\bibliographystyle{myabbrvnat}

\usepackage{filecontents}
\begin{filecontents*}{mybib.bib}
@article{abc,
  author    = "Anna Anderson and Brenda Branson and Carla Carlson",
  title     = "Random thoughts",
  journal   = "Circularity Today",
  year      = 3001,
  volume    = 1,
  number    = 1,
  pages     = "1-100",
}
\end{filecontents*}

\begin{document}
\nocite{*}
\bibliography{mybib}
\end{document}
  • Hi Mico, many thanks for your help. It works fine. I just added an and at ' { " " * t * } ' and now is ' { " and " * t * } ' in order to have the and before the last author. At last, do you know how I can specify the 'et al.' after a certain number of authors? Thanks a lot, Giorgos. – GioR Sep 4 '14 at 8:22
  • @gioR - Glad you found my answer useful. :-) On your follow-up question: Do you want to truncate the list of authors in the citation callout or in the bib entries? – Mico Sep 4 '14 at 11:19
  • I would like to truncate the list of authors in the citation callout. Giorgos – GioR Sep 4 '14 at 11:22
  • If you load the natbib citation management package, the styles abbrvnat and myabbrvnat will automatically truncate the citation callout to FirstAuthor et al for entries with three or more authors. – Mico Sep 4 '14 at 11:24
  • 1
    @daleif - I decided to make the temporary fix "official", i.e., to simply drop all uses of bibinfo and bibinfo.check in the replacement code. – Mico Feb 27 '17 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.