我正在尝试编辑参考书目样式文件 (bst),以便仅在项目不是英文时才打印语言部分。例如,如果项目不是英文,我想使用“(in German)”,但我不知道如何修改此部分以实现它:
FUNCTION {format.language}
{ language "language" bibinfo.check
duplicate$ empty$ 'skip$
{
new.block
"(in " swap$ * ")" *
} if$
}
答案1
language
您需要在条目列表中(在 bst 文件的开头)有一个条目,然后:
FUNCTION {format.language}
{ language empty$
{ "" }
{ "English" language = % 0 is on stack if _not_ english
{ }
{ ", in German" * }
if$
}
if$
}
如果您的样式文件没有该语言的条目,那么您必须添加类似以下内容:
FUNCTION {book}
{ output.bibitem
author empty$
[...]
format.date "year" output.check
new.block
format.language
new.block
note output
fin.entry
}
我的示例输出如下所示
包含以下 bib 数据:
@BOOK{Kern2009_01,
title = {Entwicklung haptischer Geräte},
publisher = {Springer},
year = {2009},
language = {English},
editor = {Thorsten A. Kern},
isbn = {978-3540876434},
doi = {10.1007/978-3-540-87644-1},
keywords = {key:Haptik,key:Technik,key:PDF},
subtitle = {Ein Einstieg für Ingenieure}
}
@BOOK{Wilcox2005,
title = {Introduciton to robust estimation and hypothesis testing},
publisher = {Elsevie},
year = {2005},
author = {Wilcox, R. R.},
language={German},
address = {Burlington, MA},
edition = {2}
}