我认为proof
环境的顶部边距太大。我希望它在视觉上更接近它所指的命题或定理。
我已经验证过,在环境\vspace{-3ex}
前添加proof
可以得到我想要的结果。现在,我该如何修改证明环境?
我试图重新定义它,但我不知道原始定义,而且在我的 Latex 发行版中也没有找到它。
梅威瑟:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage[dvipsnames]{xcolor}
\declaretheoremstyle[
spaceabove=\topsep,
spacebelow=\topsep,
name={\color{Blue}Proposition},
]{propsty}
\declaretheorem[style=propsty]{prop}
\begin{document}
\begin{prop}
This is a proposition.
\end{prop}
\begin{proof}
The proof is left as an exercise for the reader.
\end{proof}
\begin{prop}
This is another proposition.
\end{prop}
\vspace{-3ex}
\begin{proof}
The proof is left as an exercise for the reader and it's closer to the
relevant proposition.
\end{proof}
\end{document}
选择负值似乎spacebelow
没有任何作用。所以我决定改变证明环境。
答案1
例如,你可以这样做:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage[dvipsnames]{xcolor}
\declaretheoremstyle[
spaceabove=0\topsep,
spacebelow=0\topsep,
name={\color{Blue}Proposition},
]{propsty}
\declaretheorem[style=propsty]{prop}
\declaretheoremstyle[
spaceabove=0.5\topsep,
spacebelow=0.5\topsep,
name={\color{Blue}Proposition},
]{propsty}
\declaretheoremstyle[
spaceabove=0.5\topsep,
spacebelow=1\topsep,
name=Proof,
headfont=\itshape, numbered=no
]{proofsty}
\declaretheorem[style=proofsty]{myproof}
\raggedbottom
\begin{document}
\begin{prop}
This is a proposition.
\end{prop}
\begin{myproof}
The proof is left as an exercise for the reader.
\end{myproof}
\begin{prop}
This is another proposition.
\end{prop}
\begin{myproof}
The proof is left as an exercise for the reader and it's closer to the
relevant proposition.
\end{myproof}
\end{document}