ntheorem thref 在章节标题中不起作用

ntheorem thref 在章节标题中不起作用

当我尝试在章节标题中引用定理时thref,我在这个问题的末尾收到错误消息。有办法解决这个问题吗?

Latex Error: ./seppathq.tex:57 Argument of \@xtrplargoom has an extra }.

Runaway argument?
{\M@sect {subsection}{2}{\subsecindent }{\beforesubsecskip }{\aftersubsecskip \
Latex Error: ./seppathq.tex:57 Paragraph ended before \@xtrplargoom was complete.
Latex Error: ./seppathq.tex:57 Undefined control sequence.
Latex Error: ./seppathq.tex:57 Missing \endcsname inserted.

Runaway argument?

{{\M@sect {subsection}{2}{\subsecindent }{\beforesubsecskip }{\aftersubsecskip 
Latex Error: ./seppathq.tex:218 TeX capacity exceeded, sorry [main memory size=3000000].
Latex Error: ./seppathq.tex:218 ==> Fatal error occurred, no output PDF file produced!

答案1

以下工作:

\documentclass{article}
\usepackage[thref]{ntheorem}
\newtheorem{thm}{Theorem}
\begin{document}
\section{Test}
Test
\begin{thm}\label{test}
Test
\end{thm}

\subsection{Proof of \protect\thref{test}}
Test
\end{document}

重试之前删除该.aux文件:之前的运行\protect肯定已经损坏了它。

相关内容