2

I am using a modified version of apalike2.

At the moment, the output looks like this:

Oneal, John R., Russett, Bruce and Berbaum, Michael L. (2003), Causes of Peace: Democracy, Interdependence, and International Organizations, 1885-1992, International Studies Quarterly, 47(1), 371–393.

However, I want to have it like this:

Oneal, John R., Bruce Russett and Michael L. Berbaum (2003), Causes of Peace: Democracy, Interdependence, and International Organizations, 1885-1992, International Studies Quarterly, 47(1), 371–393.

How do I change the order of vv/ll/jj/ff for the second and the third (etc.) authors in this special case?

Here is the format.names function:

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=   % last name first
      nameptr #1 >
    { namesleft #1 >
        { ", " * t * }
        { numnames #2 >
        { "," * }
        'skip$
          if$
          t "others" =
        { " et~al." * }
        { " \& " * t * }    % changed from " and " for names -- BJR 10/5/89
          if$
        }
      if$
    }
    't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}
1

I suggest you (i) make a copy of apalike2.bst, naming the copy (say) myapalike2.bst, and (ii) replace the entire names.format function with the following code:

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

The full details of the new code are tedious to explain, but the main difference is that the single line

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

in the old function has been replaced with

    { namesleft #0 > }
    { s nameptr
      duplicate$ #1 >
        { "{ff~}{vv~}{ll}{, jj}" }
        { "{vv~}{ll}{, jj}{, ff}" }
      if$
      format.name$
      't :=

The upshot is that two different formatting rules are provided, depending on whether it's the very first author's name or some later author's name that's being formatted.

Save the file myapalike2.bst either in the same directory with your main tex file or in a directory that's searched by BibTeX. If you choose the second method, be sure to update your TeX distribution's filename database appropriately.

Start using the new bibliography style by providing the instruction \bibliographystyle{myapalike2}. Be sure to run LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

Happy BibTeXing!

enter image description here

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{oneal:2003,
  author = "Oneal, John R. and Russett, Bruce and Berbaum, Michael L.",
  year  =  2003, 
  title = "Causes of Peace: {Democracy}, Interdependence, and International Organizations, 1885--1992", 
  journal = "International Studies Quarterly", 
  volume  = 47,
  number  = 1, 
  pages   = "371-393",
}
\end{filecontents*}
\usepackage{natbib}  % citation management package
\begin{document}
\cite{oneal:2003}
\bibliographystyle{myapalike2}  % the new bibliography style
\bibliography{\jobname} 
\end{document}

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.