試著用定理[name=Dominio e codominio dell'operatore $D^{\vct{q}}$,label=thm:oss:DomCodomDq]
給出以下錯誤:
此錯誤由以下 MWE 給出:
\documentclass[a4paper]{report}
\usepackage{amsmath,amssymb,thmtools}
\newtheorem{oss}{Osservazione}
\begin{document}
\begin{oss}[name=Dominio e codominio dell'operatore $D^{\overrightarrow{q}}$,label=thm:oss:DomCodomDq]
\end{oss}
\end{document}
其中\vct
已被其原始名稱替換\overrightarrow
。該錯誤顯然與 相關\vct
,因為刪除 就會消除該錯誤。這是什麼意思以及我該如何解決它?
答案1
定義一個虛擬物件:
\documentclass[a4paper]{report}
\usepackage{amsmath,amssymb,thmtools}
\newtheorem{oss}{Osservazione}
\begin{document}
\def\dummy{$D^{\overrightarrow{q}}$}
\begin{oss}[name=Dominio e codominio dell'operatore \protect\dummy,label=thm:oss:DomCodomDq]
\end{oss}
\end{document}
或使用:
$D^{\protect\overrightarrow{q}}