就像在这个例子中
\documentclass{report}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[chapter]
\begin{document}
\begin{theorem} theorem \end{theorem}
I want this line be unpushed
\end{document}
删除\usepackage{amsthm}
可以解决问题,但我需要该包。
答案1
amsthm 故意禁用普通 latex 列表的功能,如果没有明确的段落分隔符(如空行),则不会缩进列表末尾的行,方法是定义\def\@endtheorem{\endtrivlist\@endpefalse }
您可以像这样全局更改此设置(针对新定理):
\documentclass{report}
\usepackage{amsthm}
\makeatletter
\def\@endtheorem{\endtrivlist}
\makeatother
\newtheorem{theorem}{Theorem}[chapter]
\begin{document}
\begin{theorem} theorem \end{theorem}
I want this line be unpushed
\begin{theorem} theorem \end{theorem}
I want this line be pushed
\end{document}