我有以下引用:
\citet{vonNeumann1947} introduced expected utility theory, the first fully formalized theory of choice under risk, in their \citetitle{vonNeumann1947}.
定义vonNeumann1947
如下
@book{vonNeumann1947,
address = {Princeton},
author = {von Neumann, John and Morgenstern, Oskar},
booktitle = {The Theory of Games and Economic Behavior},
publisher = {Princeton University Press},
title = {{The Theory of Games and Economic Behavior}},
year = {1947}
}
这被渲染biblatex
为
von Neumann and Morgenstern (1947) introduced expected utility theory, the first fully formalized theory of choice under risk, in their The Theory of Games and Economic Behavior.
有没有什么方法可以将The
书名中的从中删除,\titlecite{}
而又不必弄乱.bib
文件中的标题?
答案1
有了 Biber,一切就变得如此简单
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=false]{
\step[fieldsource=title, match=\regexp{\AThe\s+(.*)}, final]
\step[fieldset=shorttitle, fieldvalue={$1}]
}
}
}
但因为你在球场周围还有另一副支架,title
所以我们需要用稍长一点的
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=false]{
\step[fieldsource=title, match=\regexp{\AThe\s+(.*)}, final]
\step[fieldset=shorttitle, fieldvalue={$1}]
}
\map[overwrite=false]{
\step[fieldsource=title, match=\regexp{\A\{The\s+(.*)\}}, final]
\step[fieldset=shorttitle, fieldvalue=\regexp{{$1}}]
}
}
}