我之前使用的是 MWE 1(运行良好),但现在我想摆脱定理环境(MWE 2)。但是,这不起作用,我收到以下错误。有什么想法可以让 MWE 2 正常工作吗?
错误
! LaTeX Error: Something's wrong--perhaps a missing \item
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
1.14 \end{align}
%
微波能量吸收 1
\documentclass{article}
\usepackage{amsmath,amsthm}
\newtheorem{theorem}{Theorem}[section]
\begin{document}%
\begin{theorem}%
\begin{enumerate}%
\begin{align}%
\intertext{\item Condition $A$}
a &= b
\intertext{\item Condition $B$}
c &= d
\end{align}%
\end{enumerate}%
\end{theorem}%
\end{document}%
微波辐射计 2
\documentclass{article}
\usepackage{amsmath,amsthm}
\newtheorem{theorem}{Theorem}[section]
\begin{document}%
\begin{enumerate}%
\begin{align}%
\intertext{\item Condition $A$}
a &= b
\intertext{\item Condition $B$}
c &= d
\end{align}%
\end{enumerate}%
\end{document}%
答案1
我不知道定理的最佳实践,但正常情况下,你至少需要一个\item
数学模式之外的定理。请看我的第二个示例,这是正确的语法。
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools,amsthm}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\begin{theorem}
\begin{enumerate}
\begin{align}
\intertext{\item Condition $A$}
a &= b
\intertext{\item Condition $B$}
c &= d
\end{align}
\end{enumerate}
\end{theorem}
\begin{enumerate}
\item Condition $A$ % move this out from the align
\begin{align}
a &= b
\intertext{\item Condition $B$}
c &= d
\end{align}
\end{enumerate}
\end{document}
题外话:\shortintertext{}
在这里看起来会更好。
就我个人而言,我会这样做:
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools,amsthm}
\newtheorem{theorem}{Theorem}[section]
\usepackage{enumitem}
\usepackage{blindtext}
\begin{document}
\blindtext
\begin{theorem}\leavevmode
\begin{enumerate}[labelindent=0pt,labelwidth=\widthof{Condition \textit{A}},label=Condition \Alph*,itemindent=4em,leftmargin=!]
\item
\begin{align}
a &= b
\shortintertext{\item\mbox}
c &= d
\end{align}
\end{enumerate}
\end{theorem}
\begin{enumerate}[labelindent=0pt,labelwidth=\widthof{Condition \textit{A}},label=Condition \Alph*,itemindent=4em,leftmargin=!]
\item
\begin{align}
a &= b
\shortintertext{\item\mbox}
c &= d
\end{align}
\end{enumerate}
\end{document}