在 LaTeX 中,我有
\documentclass{article}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\begin{document}
\begin{theorem}
Some theorem.
\end{theorem}
\begin{proof}
Some proof
\end{proof}
\end{document}
我收到错误信息:! LaTeX Error: No counter 'Theorem' defined.
任何帮助都将非常感激!
答案1
AMS 软件包(主要是amsthm
)修改了newtheorem
命令。您newtheorem
在加载软件包之前调用了该命令,因此无法正确创建定理。相反,只需先加载软件包,然后定义定理即可。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\begin{document}
\begin{theorem} Some theorem. \end{theorem}
\begin{proof} Some proof \end{proof}
\end{document}