可以存在非常多的实现方法,这里介绍7种常用的方法:
对于下面这样的一个文献:
@article{Chen1990a,
author = {Chen, S. and Billing, S. A. and Cowan, C. F. and others},
title = {Practical identification of MARMAX models},
journal = {Int Journal of Control},
year = {1990},
volume = {52},
number={6},
pages = {1327-1350},
}
假设其中期刊Int Journal of Control的缩写名为Int J Control,那么可以采用如下方法实现:
首先可以利用jabref维护一个期刊缩写的列表,接口在菜单:选项下的管理期刊缩写,
使得Int Journal of Control对应缩写名为Int J Control
接着选择需要转换的参考文献条目,然后利用菜单:工具下的缩写期刊名选项进行替换
在py文件中设置
sourcemaps=[#maps
[#map1:根据标题的字符编码范围确定标题的语言类型
[{"fieldsource":"journal","match":r'Int Journal of Control',"final":True}],#step1
[{"fieldset":"journal","fieldvalue":r'Int J Control'}]#step2
],
]
然后设置输入bib文件为需要修改的bib文件,接着运行该py脚本。
修改bib文件内容为:
%@string{CHENJOURNAL="Int Journal of Control"}
@string{CHENJOURNAL="Int J Control"}
@article{Chen1990a,
author = {Chen, S. and Billing, S. A. and Cowan, C. F. and others},
title = {Practical identification of MARMAX models},
journal = CHENJOURNAL,
year = {1990},
volume = {52},
number={6},
pages = {1327-1350},
}
这就是最笨的方法,手动将bib文件中的Int Journal of Control更改为Int J Control。
在导言区增加:
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=journal,match={Int Journal of Control},final]%当存在booktitle域是映射为inbook
\step[fieldset=journal,fieldvalue={Int J Control}]
}
}
}
条目内容更改为:
@article{Chen1990a,
author = {Chen, S. and Billing, S. A. and Cowan, C. F. and others},
title = {Practical identification of MARMAX models},
journal = {Int Journal of Control},
shortjournal={Int J Control},
year = {1990},
volume = {52},
number={6},
pages = {1327-1350},
}
期刊名域输出格式修改为:
\renewbibmacro*{journal}{%
\iffieldundef{shortjournal}
{\ifboolexpr{
test {\iffieldundef{journaltitle}}
and
test {\iffieldundef{journalsubtitle}}
}%
{}%
{\printtext[journaltitle]{%
\printfield[titlecase]{journaltitle}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{journalsubtitle}}%
}%
}%
{\printtext[journaltitle]{%
\printfield[titlecase]{shortjournal}}%
}%
}
条目内容更改为:
@article{Chen1990a,
author = {Chen, S. and Billing, S. A. and Cowan, C. F. and others},
title = {Practical identification of MARMAX models},
journal = {Int Journal of Control},
shortjournal={Int J Control},
year = {1990},
volume = {52},
number={6},
pages = {1327-1350},
}
在导言区增加,如下设置:
%在输出文献表时使用钩子
\AtEveryBibitem{
\savefield{shortjournal}{\temptitle}%
\restorefield{journaltitle}{\temptitle}%
}
后两种的示例测试见:biblatex 简明使用手册
从实践看采用jabref这种工具是最便捷的方法,当然增加shortjournal的方法在有更多格式定制要求时会是更好的选择。