我makebst
创建了一个.bst
文件,但最后一个作者姓名和年份之间有两个句点。我该如何删除一个句点?
全部myHarvard.bst
可以找到这里下面说两个我认为有关联的函数。
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title "title" output.check
new.block
crossref missing$
{
journal
"journal" bibinfo.check
emphasize
"journal" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
format.url output
new.block
format.note output
fin.entry
}
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
{ ". " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
答案1
我想我找到办法解决这个问题。
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
{ add.period$ " " * write$ } % <- change this line
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}