3

I'm using natbib package for my reference list. I have been struggling with BibTeX. I'm writing for Journal of Finance, and they want > 3 citations to be in "et al." format for the body of the paper. But the Journal's .bst file makes it such that no amount of authors will make natbib \citet or \citep (or any other method of citing) truncate the author list to "Jones et al. (2009)" (for example); all authors will always be listed.

I've found a solution to a different .bst (not the Journal of Finance's .bst). But the journal's .bst has a format.names function that's completely different to this and I can't edit it such that every paper that has > 3 authors gets truncated to "et al." in the body of the paper.

Please assist. Here's the code for the Journal's format.names function (SOURCED FROM http://www.ivo-welch.info/computers/bstfiles/):

 FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
{ namesleft #0 > }
{ nameptr #1 >
    { s nameptr "{ff }{vv~}{ll}{, jj}" format.name$ 't := }
    { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := }
  if$
  nameptr #1 >
    {
      namesleft #1 >
        { ", " * t * }
        {
          ", " *
          t "others" =
            { " et~al." * }
%                { " {\small and} " * t * }
            { " and " * t * }   
%%%KCB: added \small  %%KD removed small
          if$
        }
      if$
    }
    't
  if$
  nameptr #1 + 'nameptr :=
  namesleft #1 - 'namesleft :=
}
  while$
}
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
Jase
  • 171
  • Just curious: Where did you obtain the file jf.bst from? From the journal's own site or from somewhere else? Please advise. – Mico Jul 02 '12 at 16:20
  • It would be nice if you could provide the whole .bst, maybe a link for us to download it. IIRC format.name makes use of other definitions in the file. :) – Paulo Cereda Jul 02 '12 at 16:50
  • I was not aware that the "format.names" functions referes to other functions that are uniquely specified in jf.bst. Sorry; this language is Egyptian to me. The jf.bst that I'm trying to use can be downloaded from here (it's unofficial): http://www.ivo-welch.info/computers/bstfiles/. Thanks all. –  Jul 03 '12 at 04:13

2 Answers2

2

The linked style was generated for 'standard' BibTeX use with the LaTeX kernel's \cite, and not with natbib. As such, you should look at generating a new .bst file using custom-bib or considering switching to biblatex.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
0

Alright, I had the same problem, as I wanted to have shorter citations in a beamer presentation (even though the Journal of Finance abbreviates only after more than three authors).

It is not the "format.names" function in the .bst file, but the "format.lab.names" function that has to be changed. Here the correct function. (I think this is still of relevance, as this function seems to govern the et al. threshold in other .bst files as well.)

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 >
        {
        % Change here numnames from #3 to #2 if et al. should come up 
        % for any reference with more than 2 authors
          nameptr #2 =
          numnames #2 > 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$
}