If a bibliographic entry has more than three authors, I want to have only the first three authors' names written out, plus "et. al".
I found out that to achieve this I have to change the .bst file and therein the "format.names" function. I found this other site where basically my question is answered. However I don't know why this solution does not work in my case and therefore the following post:
To be more precise my original format.names function looks like:
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ "," * }
'skip$
if$
t "others" =
{ " {\em et~al.}" * }
{ string.and * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
and the new one is
FUNCTION {format.names}
{
nameptr #1 >
{
nameptr #3
#1 + =
numnames #5
> and
{ "\bibinfo{person}{\bibinfo{person}{others}}" 't :=
#1 'namesleft := }
'skip$
if$
namesleft #1 >
}
With the new format.names function I get many errors when I apply BibTeX:
The top-level auxiliary file: thesis_main.aux
The style file: utphys_custom_threeAuthors.bst
function is an unknown function---line 415 of file utphys_custom_threeAuthors.bst
format.authors is an unknown function---line 415 of file utphys_custom_threeAuthors.bst
Curse you, wizard, before you recurse me:
function format.names is illegal in its own definition
---line 418 of file utphys_custom_threeAuthors.bst
Unfortunately I do not understand the language in which the .bst file is written and I might have a stupid mistake. It would be awesome if you could help me.
biblatexit is as simple as loading it with options[maxnames=3,minnames=3]. – Bernard Jul 04 '20 at 20:54utphys.bstavailable online? – Mico Jul 04 '20 at 21:06utphys.bstas well. The only thing you need to adapt is to replacenumnames #5withnumnames #3, since you wish to apply truncation whenever there are more than 3 authors. Please do give it another try. – Mico Jul 05 '20 at 05:09