没有定义反定理

没有定义反定理

我收到以下错误,但还不能找出问题所在

! LaTeX Error: No counter 'theorem' defined.

我有

\newtheorem{galex-theorem}{Theorem}[section]
\newtheorem{galex-corollary}{Corollary}[theorem]

这可能会有问题,但我看不清楚。

答案1

由于错误表明您尚未定义theorem,但您已定义galex-thorem,因此我认为您有意这样做。 (您没有表明您的预期输出)

在此处输入图片描述

\documentclass{article}

\newtheorem{galex-theorem}{Theorem}[section]
\newtheorem{galex-corollary}{Corollary}[galex-theorem]

\begin{document}

\section{hmmm}

\begin{galex-theorem}
  $1=0$
\end{galex-theorem}
\begin{galex-corollary}
  everything is provable
\end{galex-corollary}


\begin{galex-theorem}
  a new theorem
\end{galex-theorem}
\begin{galex-corollary}
  corollary 1 (again) as reset by galex-theorem
\end{galex-corollary}
\begin{galex-corollary}
  corollary 2 
\end{galex-corollary}


\end{document}

相关内容