![Itemize 内部环境在后面留出双倍空间](https://linux22.com/image/327698/Itemize%20%E5%86%85%E9%83%A8%E7%8E%AF%E5%A2%83%E5%9C%A8%E5%90%8E%E9%9D%A2%E7%95%99%E5%87%BA%E5%8F%8C%E5%80%8D%E7%A9%BA%E9%97%B4.png)
一些定义和定理以 itemize 结尾。当我使用纯 amsthm 时,它看起来不错,但当我使用 thmtools+amsthm 时,它看起来很丑陋,定理下方有太多空间。我看不出我在 \declaretheoremstyle 中做错了什么。
有人可以帮帮我吗?
\documentclass{article}
\usepackage{amsthm}
%%%%%%%%%%% Uncomment to use pure amsthm %%%%%%%%%%%%
% \newtheorem{mytheorem}{Mytheorem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Comment out to use pure amsthm %%%%%%%%%%
\usepackage{thmtools}
% Set all vertical spaces I know of to zero to illustrate issue.
\declaretheoremstyle[
spaceabove=0pt,
spacebelow=0pt,
headfont=\normalfont\bfseries,
notefont=\bfseries,
notebraces={(}{)},
bodyfont=\normalfont,
qed={},
headpunct={.}
]{mytheoremstyle}
\declaretheorem[style=mytheoremstyle, name=MyTheorem]{mytheorem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\noindent
Text before theorem without indent for clarity.
\begin{mytheorem}
Here is my theorem with itemize inside it.
\begin{itemize}
\item My item A.
\item My item B.
\end{itemize}
\end{mytheorem}
\noindent
Text after the theorem without indent for clarity.
\begin{mytheorem}
Here is another theorem without any itemize inside it.
\end{mytheorem}
\noindent
Final text here without indent for clarity.
\end{document}
答案1
我认为这qed={}
是添加了一行空格。如果你注释掉它,差异就会消失:
\documentclass{article}
\usepackage{amsthm}
%%%%%%%%%%% Uncomment to use pure amsthm %%%%%%%%%%%%
% \newtheorem{mytheorem}{Mytheorem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% Comment out to use pure amsthm %%%%%%%%%%
\usepackage{thmtools}
% Set all vertical spaces I know of to zero to illustrate issue.
\declaretheoremstyle[
spaceabove=0pt,
spacebelow=0pt,
headfont=\normalfont\bfseries,
notefont=\bfseries,
notebraces={(}{)},
bodyfont=\normalfont,
% qed={},
headpunct={.}
]{mytheoremstyle}
%
\declaretheorem[style=mytheoremstyle, name=MyTheorem]{mytheorem}
% \declaretheorem[name=MyTheorem]{mytheorem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\noindent
Text before theorem without indent for clarity.
\begin{mytheorem}
Here is my theorem with itemize inside it.
\begin{itemize}
\item My item A.
\item My item B.
\end{itemize}
\end{mytheorem}
\noindent
Text after the theorem without indent for clarity.
\begin{mytheorem}
Here is another theorem without any itemize inside it.
\end{mytheorem}
\noindent
Final text here without indent for clarity.
\end{document}