1

I am in the process of finalising my dissertation. Although I am using LaTeX now for quite some time, I learnt again a lot about LaTeX while typesetting the thesis. Still, I have a tiny issue with the format of the references in the bibliography.

As bibliography style I am using an adapted version of the unsrtdin.bst file. I managed to change it to automatically cut the author list and print only the first five authors while substituting the remaining ones by "others". The last delimiter of the author list or between only two authors is "and". This results in "and others" at the end of a cut authorlist. However, I would prefer to simply have "et al." at the end of the cut author list without any delimiter in front of it.

The (hopefully) respective code junk of my format.names function in the .bst file looks as follows, but I didn't managed to find the right line/s to change:

nameptr #1 >
     {
      nameptr #5
      #1 + =
      numnames #5
      > and
        { " others" 't :=       %% simply setting " et al." here produces "and et al."
          #1 'namesleft := }
        'skip$
      if$
      namesleft #1 >
         { " ; " * t * }
         { numnames #2 >
              { " " * }
              'skip$
           if$
           t "\textsc{others}" = t "\textsc{others} (ed.)" = or
              { " others" * }
              { " and " * t * }
           if$
           }
      if$  
      }
        't
  if$  

An exemplary output of this custom style looks like

enter image description here

and I would like to have

"Tacutu, R. ; Craig, T. ; Budovsky, A. ; Wuttke, D. ; Lehmann, G. et al.".

Best, Anna

1

You need to change " others " to " et al." at the location indicated in your code by the comment. Additionally, you will have to change " and " to "" a few lines below that. Below is the entire FUNCTION {format.names}:

%% Adelspraedikate beim Sortieren nach den(m) Vornamen auffuehren
%% Abweichend v. DIN !!!
FUNCTION {format.names}
{ 's :=
  "" 'u  :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    {
       s nameptr "{ll}" format.name$ 't :=
       t capitalize 't :=
       s nameptr "{ jj}" format.name$ 'w :=
       s nameptr "{, ff}{ vv}{ jj}" format.name$ 'u :=
       u  text.length$  'lang :=
       #1 'zahl :=
       "" 'v :=
         {  zahl  lang  <  }
         {  u  zahl  #1  substring$  "~"  =
               {  v  ""  =
                     {  u  #1  zahl  #1  -  substring$  'v :=  }
                     'skip$
                  if$
                  v  u  zahl  #2  substring$ * "." *  w * 'v :=
                }
               'skip$
            if$
            zahl  #1  +  'zahl :=  }
      while$
      v  ""  =
         {  u  'v :=  }
         'skip$
      if$
      t  v  *  fkt  *  't :=
nameptr #1 >
     {
      nameptr #5
      #1 + =
      numnames #5
      > and
        { " et al." 't :=       %% simply setting " et al." here produces "and et al."
          #1 'namesleft := }
        'skip$
      if$
      namesleft #1 >
         { " ; " * t * }
         { numnames #2 >
              { " " * }
              'skip$
           if$
           t "\textsc{others}" = t "\textsc{others} (ed.)" = or
              { " others" * }
              { "" * t * }
           if$
           }
      if$  
      }
            't
           if$  %%  Ende der nameptr-Pruefung

      nameptr #1 + 'nameptr :=
      namesleft #1 -  'namesleft :=
    }
  while$  %%  Ende von { namesleft #0 > } ganz oben
  "" 'fkt :=  %% fkt wird zurueckgesetzt
}

which produces:

enter image description here

1
  • Thanks a lot for your help! I realised that I have to add the following change to keep "and" as a delimiter of only two authors. { numnames #2 > { " " * } { " and " *} %% replaced 'skip$ if$
    – anna
    Oct 16 '15 at 21:22

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.