BibTeX, biblatex and biberThree authors before et al.

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Matias
Posts: 20
Joined: Sun Jan 17, 2010 11:40 pm

Three authors before et al.

Post by Matias »

Hi guys.

I use LyX 1.6 and JabRef 2.5.

I use a bib style file called vancouver.bst.

It lists 6 authors before et al., and I want it to list 3. Is this possible?

I upload the .bst file as an attachment. It's located inside vancouver.zip.

Edit: Here is the part in the code I think controls this.

Code: Select all

FUNCTION {format.names}
{ 'bibinfo :=
  duplicate$ empty$ 'skip$ {
  "." ". " find.replace 's :=
  "" 't :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      "{vv~}{ll}{ f{}}{ jj}"
      format.name$
      remove.dots
      bibinfo bibinfo.check
      't :=
      nameptr #1 >
        {
          nameptr #6
          #1 + =
          numnames #6
          > and
            { "others" 't :=
              #1 'namesleft := }
            'skip$
          if$
          namesleft #1 >
            { ", " * t * }
            {
              "," *
              s nameptr "{ll}" format.name$ duplicate$ "others" =
                { 't := }
                { pop$ }
              if$
              t "others" =
                {
                  " " * bbl.etal *
                }
                { " " * t * }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
  } if$
}
Attachments
vancouver.zip
(98.09 KiB) Downloaded 234 times
Last edited by Matias on Mon Jan 18, 2010 10:43 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

olofos
Posts: 56
Joined: Tue Nov 24, 2009 10:37 pm

Three authors before et al.

Post by olofos »

It should work to change the lines

Code: Select all

          nameptr #6
          #1 + =
          numnames #6
          > and
to

Code: Select all

          nameptr #3
          #1 + =
          numnames #3
          > and
Don't forget to rename the file before making changes to it.
Matias
Posts: 20
Joined: Sun Jan 17, 2010 11:40 pm

Re: Three authors before et al.

Post by Matias »

Thank you, that seems to work.
Post Reply