
pdflatex
次のドキュメントを実行中
\documentclass{article}
\usepackage{glossaries-extra}
\newglossaryentry{injective}{name={\ensuremath{X\overset{1:1}{\rightarrow}Y}},description={injective function}}
\makeglossaries
\begin{document}
\glsadd{injective}
\printglossaries
\end{document}
次のコンパイル エラーが発生します。
! Argument of \@tempc has an extra }.
<inserted text>
\par
l.3 ...arrow}Y}},description={injective function}}
答え1
\overset
堅牢ではないので、ファイルへの書き込みに失敗します。
...X\protect\overset...
ところで、私はおそらく構文の代わりにamsmath
andを使うでしょう\xrightarrow{1{:}1}
\overset