更改證明環境的上邊距

更改證明環境的上邊距

在我看來,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} 

在此輸入影像描述

相關內容