参考这问题,我发现更新宏时出现问题cite:idem
,因为编译器无法解析变量 idemgender
。
以下是从所引用的问题中得出的一个例子。宏cite:idem
被更新为以小写字母打印其参数。
\documentclass{article}
\usepackage[italian]{babel}
\usepackage[backend=biber, citestyle=verbose-trad2]{biblatex}
\begin{filecontents*}{\jobname.bib}
@article{bollman1966cannophori,
author = {Demidov, S.S.},
title= {N.V. Bugaev e lo sviluppo della scuola matematica moscovita},
journaltitle = {Ricerche di storia della matematica},
date = {1985},
number = {XXIX},
pages= {113-124},
}
@incollection{bollman1998romische,
author = {Demidov, S.S.},
title= {N.V. Bougaiev et la creation de l'Ecole de Moscou},
date = {1985},
booktitle= {Mathemata.},
editor = {Folkerts, M.},
publisher= {Steiner Verlag},
location = {Stuttgart},
pages = {651-673},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\providecommand*{\mkidem}[1]{\textsc{#1}}
% substitute: \mkidem for \mkibid
\renewbibmacro*{cite:idem}{\bibstring[\mkidem]{idem\thefield{gender}}\setunit{\printdelim{nametitledelim}}}
\begin{document}
First \footcites{bollman1998romische}{bollman1966cannophori}
And second\footcite{bollman1966cannophori}
\end{document}
使用 LuaLateX 编译的输出给出以下脚注:
如您所见,文档打印的不是“Idem”,而是令牌性别认同。
答案1
问题中的代码包含一些不可见的字符,这会使事情变得混乱。当从评论中复制代码时,我在这个网站上多次看到过这种效果。
\thefield
具体来说,和之间有一个零宽度非连接符 (U+200c),在in之后和 in 之后也有{gender}
一个零宽度非连接符 (U+200c) 和一个零宽度空格 (U+200b) 。如果您查看代码突出显示,您会发现 有点不对劲: 所有的 都应该是蓝色的,但在问题的代码中只有是蓝色的。p
\printdelim
d
nametitledelim
p
\printdelim
\p
像这样的网站https://w3c.github.io/xml-entities/unicode-names.html可以极大地帮助找到那些讨厌的隐形字符。
当我删除不需要的不可见字符时,下面的工作就正常了
\documentclass{article}
\usepackage[italian]{babel}
\usepackage[backend=biber, citestyle=verbose-trad2]{biblatex}
\providecommand*{\mkidem}[1]{\textsc{#1}}
\renewbibmacro*{cite:idem}{%
\bibstring[\mkidem]{idem\thefield{gender}}%
\setunit{\printdelim{nametitledelim}}}
\begin{filecontents*}{\jobname.bib}
@article{bollman1966cannophori,
author = {Demidov, S.S.},
title = {N.V. Bugaev e lo sviluppo della scuola matematica moscovita},
journaltitle = {Ricerche di storia della matematica},
date = {1985},
number = {XXIX},
pages = {113-124},
}
@incollection{bollman1998romische,
author = {Demidov, S.S.},
title = {N.V. Bougaiev et la creation de l'Ecole de Moscou},
date = {1985},
booktitle = {Mathemata},
editor = {Folkerts, M.},
publisher = {Steiner Verlag},
location = {Stuttgart},
pages = {651-673},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
First \footcites{bollman1998romische}{bollman1966cannophori}
And second\footcite{bollman1966cannophori}
\end{document}