
저자가 5명 이상인 항목을 다음과 같이 단축하는 bst 파일이 있습니다.외. 하지만 4명 이상의 저자가 사용할 수 있도록 수정하고 싶습니다. 이것이 관련 코드 조각이라고 생각합니다. 하지만 수정된 동작을 얻으려면 어떻게 변경해야 합니까?
이 질문은 다음과 유사합니다..bst 파일의 BibTeX "format.names" 기능을 변경하여 "et al."을 강제 실행합니다. 저자가 3명 이상인 항목에 대한 인용하지만 이 bst 파일은 이미 비슷한 기능을 성공적으로 수행하고 있기 때문에 아마도 이 질문에 대한 답을 얻을 확률이 더 높을 것입니다.
이 구문은 정말 BeaST입니다. 여기서 무슨 일이 일어나고 있는지 누군가 나에게 설명해 주시면 정말 감사하겠습니다.
FUNCTION {format.names}
{ 'bibinfo :=
duplicate$ empty$ 'skip$ {
's :=
"" 't :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{vv~}{ll}{, f.}{, jj}"
format.name$
bibinfo bibinfo.check
't :=
nameptr #1 >
{
nameptr #1
#1 + =
numnames #5
> and
{ "others" 't :=
#1 'namesleft := }
'skip$
if$
namesleft #1 >
{ ", " * t * }
{
s nameptr "{ll}" format.name$ duplicate$ "others" =
{ 't := }
{ pop$ }
if$
t "others" =
{
" " * bbl.etal emphasize *
}
{
"\&"
space.word * t *
}
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
} if$
}
원천:http://mirror.unl.edu/ctan/macros/latex/contrib/nature/naturemag.bst
답변1
나에게는 완전히 불분명한 이유로 #5를 #3으로 변경하면 작동합니다. #5와 #4는 동일한 동작을 하는 것 같습니다. 여기서 무슨 일이 일어나고 있는지 설명하는 답변을 기꺼이 받아들이겠습니다.
FUNCTION {format.names}
{ 'bibinfo :=
duplicate$ empty$ 'skip$ {
's :=
"" 't :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{vv~}{ll}{, f.}{, jj}"
format.name$
bibinfo bibinfo.check
't :=
nameptr #1 >
{
nameptr #1
#1 + =
numnames #3
> and
{ "others" 't :=
#1 'namesleft := }
'skip$
if$
namesleft #1 >
{ ", " * t * }
{
s nameptr "{ll}" format.name$ duplicate$ "others" =
{ 't := }
{ pop$ }
if$
t "others" =
{
" " * bbl.etal emphasize *
}
{
"\&"
space.word * t *
}
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
} if$
}