如何增加 \begin{proof} 環境的行距?

如何增加 \begin{proof} 環境的行距?

我希望更改 amsthm 的證明環境中的間距(在我的情況下,增加間距)。我已經包括了我的嘗試。我不想編號,所以我包含了 *。但是,我的嘗試失敗了,因為它在最右邊的證明末尾不包含 QED 符號(我需要)。有人對如何獲得增加的間距和 QED 符號有任何想法嗎?我已經包含了程式碼的輸出,以便每個人都可以看到我的myplain2 環境和\begin{proof} 環境之間的差異(我的程式碼具有我想要的間距,但沒有QED 符號,而\begin{ proof} 環境確實沒有我想要的間距,但有 QED 符號)。

\newtheoremstyle{myplain2}
 {-\baselineskip\topsep}   % ABOVESPACE
  {\topsep}   % BELOWSPACE
  {\normalfont\setstretch{2}}  % BODYFONT
  {0pt}       % INDENT (empty value is the same as 0pt)
  {\bfseries} % HEADFONT
  {.}         % HEADPUNCT
  {5pt plus 1pt minus 1pt} % HEADSPACE
  {}   
\theoremstyle{myplain2}
\newtheorem*{proof_new}{Proof}

\begin{proof}
Oh hi Mark.\\
Oh hi Mark.\\
Oh hi Mark.
\end{proof}

\begin{proof_new}
Oh hi Mark.\\
Oh hi Mark.\\
Oh hi Mark.
\end{proof_new}


在此輸入影像描述

答案1

我不確定原因是什麼。反正…

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{setspace}

\usepackage{lipsum} % for mock text

% spaced proof
\newenvironment{sproof}
 {\par\vspace{-\topsep}\begin{spacing}{1.5}\begin{proof}}
 {\end{proof}\end{spacing}\par\vspace{-\topsep}}

\begin{document}

\lipsum[1][1-5]

\begin{proof}
\lipsum[2][1-5]
\end{proof}

\lipsum[1][1-5]

\begin{sproof}
\lipsum[2][1-5]
\end{sproof}

\lipsum[1][1-5]

\end{document}

在此輸入影像描述

答案2

您可以使用 setspace 套件來設定校樣與空間環境的間距。

下面給一個例子:

\documentclass[12pt,a4paper]{book} 
\usepackage{setspace}

\renewcommand{\baselinestretch}{1} 


\begin{document}
    
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
    
    \begin{spacing}{2}
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing.
    \end{spacing}


    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown pri.



\end{document}

間距輸出

相關內容