上述链接的最后一部分包含逗号和 and,这在语法上是不正确的。我该如何避免使用逗号?
答案1
为了避免逗号,你必须修改统一文件如下:
替换以下代码:
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ "," * }
'skip$
if$
t "others" =
{ " et~al." * }
{ " and " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
通过代码:
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ " " * } % modified { "," * }
'skip$
if$
t "others" =
{ " et~al." * }
{ " and " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
MWE 是:
\documentclass{article}
\begin{filecontents*}{test.bib}
@article{A,
archivePrefix = {arXiv},
arxivId = {hep-th/9605032},
author = {AuthorI, A. and AuthorII, B. and AuthorIII, C.},
eprint = {9605032},
journal = {Journal of Bla bla},
pages = {12},
primaryClass = {hep-th},
title = {{Title of the paper A}},
volume = {123},
year = {2016}
}
@article{B,
archivePrefix = {arXiv},
author = {AuthorA, A. and AuthorB, B. and AuthorC, C.},
arxivId = {1512.00704},
eprint = {1512.00704},
journal = {Journal of bla bla},
pages = {1233},
title = {{Title of the paper B}},
volume = {567},
year = {2016}
}
\end{filecontents*}
\begin{document}
~\nocite{*}
%Bibleography
\bibliographystyle{unsrt}
\bibliography{test}
\end{document}