1

I wanna that when there are more than three authors in .bib file, latex can truncate authors automatically.

Say Tang, J. and Scellato, S. and Musolesi, M. and Mascolo, C. and Latora, V. in .bib file should display in paper as Tang, J., Scellato, S. and Musolesi, M. et al.

Expected Format first author , second author and third author et al.

I get apsrev4-1.bst. Solutions for truncating author when there are 5 or more authors.

How do I get a truncated reference, e.g., "Ann Author et al." when there are 5 or more authors?

The BibTeX style files distributed with REVTeX 4.1 no longer truncate the author lists of references (REVTeX 4's .bst files would truncate the list if there were more than 10 authors). APS editors prefer full author lists be used for references with 15 or less authors. For longer lists, use the phrase "and others" in place of the authors you want to omit.

But it need add "and others" in .bib file. How to automatically format authors without modify .bib file as I expected format?

@Article{2010Tang.J,
  Title                    = {Small-world behavior in time-varying graphs},
  Author                   = {Tang, J. and Scellato, S. and Musolesi, M. and Mascolo, C. and Latora, V.},
  Journal                  = {Phys. Rev. E},
  Year                     = {2010},

  Month                    = {May},
  Pages                    = {055101},
  Volume                   = {81},

  Doi                      = {10.1103/PhysRevE.81.055101},
  File                     = {:..\\pdfs\\Small-worldbehaviorintime-varyinggraphs\\Small-worldbehaviorintime-varyinggraphs.pdf:PDF},
  Issue                    = {5},
  Numpages                 = {4},
  Publisher                = {American Physical Society},
  Url                      = {http://link.aps.org/doi/10.1103/PhysRevE.81.055101}
}

The format.names in apsrev4-1.bst

FUNCTION {format.names}
{ 'bibinfo :=
  duplicate$ empty$ { pop$ "" } {
    duplicate$ num.names$
    duplicate$ 'numnames :=
    'namesleft :=
    's :=
    #1 'nameptr :=
    ""
      { namesleft #0 > }
      {
      format.names.morfont
        bibinfo bibinfo.check
        type$ "presentation" =
          'check.speaker
          'skip$
        if$
        't :=
        nameptr #1 > not
          {
            t *
          } {
            namesleft #1 >
              {
                names.punctuate
                t *
              } {
                s nameptr "{ll}" format.name$ duplicate$ "others" =
                  { 't := }
                  { pop$ }
                if$
                numnames #2 >
                  'names.punctuate
                  'skip$
                if$
                t "others" =
                  {
                    " " *
                    bbl.etal
                    emphasize
                    *
                  } {
                    bbl.and
                    space.word *
                    t *
                  }
                if$
              }
            if$
          }
        if$
        nameptr #1 + 'nameptr :=
        namesleft #1 - 'namesleft :=
      }
    while$
  } if$
}
5
  • 1
    Could you consider using biblatex? You'd just have to set an option. – Bernard Nov 4 '17 at 18:56
  • Can I just modify .bst file? Any references about the grammer of .bst file? I just don't know what is the scope of if$. – Nick Dong Nov 5 '17 at 6:03
  • .bst file looks like organized by a language. There seems be a flow control and variables. – Nick Dong Nov 5 '17 at 6:05
  • 1
    Reverse polish notation. biblatex is much much easier to customize. In you case by giving the option maxnames=3 to truncate after a maximum of three authors. – Johannes_B Nov 5 '17 at 6:39
  • Grammar of .bst file. Doc tame the beast – Nick Dong Nov 5 '17 at 17:03

Your Answer

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

Browse other questions tagged or ask your own question.