biber idemgenderでは、マクロcite:idemを更新しても解決されません

Dec 12 2020

この質問を参照すると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{\p‌​rintdelim{nametitled‌​elim}}}

\begin{document}
First \footcites{bollman1998romische}{bollman1966cannophori}

And second\footcite{bollman1966cannophori}
\end{document}

LuaLateXでコンパイルされた出力には、次の脚注があります。

ご覧のとおり、「Idem」の代わりに、ドキュメントはトークンidemgenderを出力します。

回答

3 moewe Dec 12 2020 at 20:22

問題のコードには、物事を台無しにするいくつかの目に見えない文字が含まれています。コメントからコードをコピーしたときに、このサイトでこの効果を何度か見ました。

具体的には、\thefieldとの間に{gender}ゼロ幅非ジョイナー(U + 200c)があり、pイン\printdelimとの後にゼロ幅非ジョイナー(U + 200c)とゼロ幅スペース(U + 200b)があります。dnametitled‌​elimpコードの強調表示を見ると、何かがおかしいことがわかります。すべて\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}