![如何在參考文獻/bibtex 風格中有效使用逗號和點](https://rvso.com/image/281479/%E5%A6%82%E4%BD%95%E5%9C%A8%E5%8F%83%E8%80%83%E6%96%87%E7%8D%BB%2Fbibtex%20%E9%A2%A8%E6%A0%BC%E4%B8%AD%E6%9C%89%E6%95%88%E4%BD%BF%E7%94%A8%E9%80%97%E8%99%9F%E5%92%8C%E9%BB%9E.png)
我想使用文章參考樣式:
作者,雜誌 體積第 23-34 頁(年)。網站連結
例如:
AN 俄亥俄州,BR Gerrad 和 M. Forsyth,納特。馬特。 24第 345-456 頁(2002 年)。交叉引用
請幫我更改 bibtex 格式樣式 (.bst),以便我可以有效地使用逗號和點。
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
{ " " * write$ }
{ output.state after.block =
{ " " * write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
FUNCTION {fin.entry}
{ write$
newline$
}
FUNCTION {format.authors}
{ author empty$
{ "," }
{ author format.names }
if$
}
FUNCTION {format.date}
{ year empty$
'year
{" (" year * ")." * }
if$
}
FUNCTION {format.vol.num.pages}
{ volume field.or.null boldface
number empty$
'skip$
{ "(" number * ")" * *
volume empty$
{ "there's a number but no volume in " cite$ * warning$ }
'skip$
if$
}
if$
pages empty$
'skip$
{ duplicate$ empty$
{ pop$ format.pages }
{ ", pp. " * pages n.dashify * }
if$
}
if$
}
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 {article}
{ output.bibitem
format.authors "author" output.check
new.block
", " * write$
format.title "title" output.check
new.block
crossref missing$
{ journal emphasize "journal" output.check
format.vol.num.pages output
format.date "year" output.check
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
new.block
howpublished output
fin.entry
}
我使用了 acs.bst 並在我進行更改的部分中...我複製並貼上在上面。可以透過將這些部分與原始 acs.bst 檔案進行比較來交叉檢查變更。它讓我完全控制逗號和點。