環境内で項目化を行うと、後に2つのスペースができます。

環境内で項目化を行うと、後に2つのスペースができます。

いくつかの定義と定理は、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}

圧縮のqedオプションの設定を解除

関連情報