[Tex/LaTex] Citation “et al.” only for four and more authors with natbib and jf.bst

author-numbernatbib

I am using the package natbiband the following jf.bst-file for the citation in my thesis http://faculty.haas.berkeley.edu/stanton/texintro/. According to the citation requirements the citation has to print out all the last names of the author when the number of authors are less than four. The problem now is, as sson as I have more than two authors I get for instance "Doyle et al. (2006)" whereas the output is supposed to be "Doyle, Lundholm and Soliman (2006)". According to the natbib reference sheet http://merkel.zoneo.net/Latex/natbib.php I can get my desired output by using \citet*. This actually is tedious as I have to check every time the number of authors before deciding which cite-command to use. Is there a way to automatically make Late understands that with the normal \cite command I can get the output mentionend above?

Best Answer

To change the truncation criterion for using "et al." in a citation callout, from a piece having three or more authors to it having four or more authors, it is necessary to modify the function format.lab.names in the bibliography style file.

I suggest you do the following:

  • Make a copy of the version of jf.bst you've been working with so far. Name the copy, say, jf3.bst -- "3" to indicate non-truncation if a piece has exactly three authors. (Don't modify jf.bst directly.)

  • Open the file jf3.bst in a text editor and find the function format.lab.names. It should start around line 1160 and span 18 lines.

  • Delete the entire function (i.e., all 18 lines) and insert the following chunk of code (46 lines total) in its place:

    FUNCTION {format.lab.names}
    {'s :=
     "" 't :=
      #1 'nameptr :=
      s num.names$ 'numnames :=
      numnames 'namesleft :=
        { namesleft #0 > }
        { s nameptr
          "{vv~}{ll}" format.name$
          't :=
          nameptr #1 >
            {
              nameptr #2 =
              numnames #3 > and
                { "others" 't :=
                  #1 'namesleft := }
                'skip$
              if$
              namesleft #1 >
                { ", " * t * }
                {
                  s nameptr "{ll}" format.name$ duplicate$ "others" =
                    { 't := }
                    { pop$ }
                  if$
                  t "others" =
                    { " et~al." * }
                    {
                      numnames #2 >
                        { "," * }
                        'skip$
                      if$
                      bbl.and
                      space.word * t *
                    }
                  if$
                }
              if$
            }
            't
          if$
          nameptr #1 + 'nameptr :=
          namesleft #1 - 'namesleft :=
        }
      while$
    }
    
  • Save the file jf3.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 option, be sure to update the filename database of your TeX distribution.

  • Start using the new bibliography style by using the instruction \bibliographystyle{jf3} instead of \bibliographystyle{jf}. After you first switch bibliography styles, be sure to run LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

Happy BibTeXing!


Addendum: Here are the citation callouts produced with \citet running the MWE below, first the jf and then with jf3. (One entry has three authors and the other has four.)

With jf, both citation callouts truncate to Andersen et al.:

enter image description here

With jf3, only one citaton callout -- for the piece with four authors -- is truncated:

enter image description here

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{abd:2007,
  author      = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold",
  title       = "Roughing it up: {Including} jump components in the
                measurement, modeling and forecasting of return volatility",
  journal     = "Review of Economics and Statistics",
  year        = 2007,
  volume      = 89,
  number      = 4,
  month       = "November",
  pages       = "701--720",
}

@article{abde:2001,
  author      = "Torben G. Andersen and Tim Bollerslev and Francis X. Diebold
                and Heiko Ebens",
  title       = "The distribution of realized stock return volatility",
  journal     = "Journal of Financial Economics",
  year        = 2001,
  volume      = 61,
  number      = 1,
  month       = "July",
  pages       = "43--76",
}
\end{filecontents*}
\usepackage[round,authoryear,comma]{natbib}
\bibliographystyle{jf}  % or: jf3
\begin{document}
\citet{abd:2007}; \citet{abde:2001}
\bibliography{\jobname}
\end{document}
Related Question