等式上方和下方的間距

等式上方和下方的間距

在我的論文中,我使用了很多方程式環境,但不僅僅是方程式本身。我用它來強調文本中的內容。但我感覺上面和下面的空間太大了。我沒有為此更改任何選項,但是有這麼多空間是否正常,如下面的程式碼所示?

\documentclass[ngerman, fontsize=11pt, DIV=12 ,BCOR = 10mm, parskip=half-, twoside]{scrbook}

\usepackage{amsmath}
\usepackage{amssymb}
\counterwithout{equation}{chapter}
\begin{document}
    We will use the following very often.
    As the set of naturals numbers we have
    \begin{equation*}
        \mathbb N 
        = 
        \left\{ 
        1,2,\dots
        \right\}.
    \end{equation*}
    To note that two elements $a$ and $b$ are equivalent modulo an integer $n$ we will write
\begin{equation*}
    a \equiv b \pmod n.
\end{equation*}
    If we want to note the remainder of $a$ divided by $n$ we will write
\begin{equation*}
    \left({a\bmod n}\right).
\end{equation*}
\end{document}

輸出是 在此輸入影像描述

答案1

如前所述,調整垂直空間可能不是一個好主意,但如果確實必須,可以使用負數值,例如下面的。

\documentclass[ngerman, fontsize=11pt, DIV=12 ,BCOR = 10mm, parskip=half-, twoside]{scrbook}

\usepackage{amsmath}
\usepackage{amssymb}
\counterwithout{equation}{chapter}
\begin{document}
    We will use the following very often.
    As the set of naturals numbers we have

    \vspace{-5ex}

    \begin{equation*}
        \mathbb N 
        = 
        \left\{ 
        1,2,\dots
        \right\}.
    \end{equation*}

    To note that two elements $a$ and $b$ are equivalent modulo an integer $n$ we will write

    \vspace{-5ex}

\begin{equation*}
    a \equiv b \pmod n.
\end{equation*}

    If we want to note the remainder of $a$ divided by $n$ we will write

    \vspace{-5ex}

\begin{equation*}
    \left({a\bmod n}\right).
\end{equation*}
\end{document}

希望有幫助。

答案2

這是品味和慣例的問題。

如果您願意,可以設定不同的間距(此處為標準的一半):

\documentclass[
%  ngerman,
  fontsize=11pt,
  DIV=12,
  BCOR = 10mm,
  parskip=half-,
  twoside,
]{scrbook}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{lipsum}% for mock text

\counterwithout{equation}{chapter}

\AtBeginDocument{%
  \setlength{\abovedisplayskip}{\skipeval{\abovedisplayskip/2}}%
  \setlength{\belowdisplayskip}{\skipeval{\belowdisplayskip/2}}%
}

\begin{document}

\lipsum[1][1-4]

We will use the following very often.
As the set of naturals numbers we have
\begin{equation*}
  \mathbb{N} = \{1,2,\dotsc\}.
\end{equation*}
To note that two elements $a$ and $b$ are equivalent modulo an integer $n$ we will write
\begin{equation*}
  a \equiv b \pmod{n}.
\end{equation*}
If we want to note the remainder of $a$ divided by $n$ we will write
\begin{equation*}
  ({a\bmod n}).
\end{equation*}

\end{document}

在此輸入影像描述

與結果比較沒有 parskip和調整:

在此輸入影像描述

也許你判斷空間太大了。但我想指出的是,parskip你的讀者會不是能夠區分新段落是在第一個還是第二個顯示之後開始。

如果您有一個以您的設定開頭的段落(以及縮小的垂直間距)會發生什麼?

在此輸入影像描述

如果沒有parskip,您將獲得與第二張圖片中相同的垂直間距和段落縮排。

注意事項:\mathbb N是錯誤的,應該是\mathbb{N}\left\right使用它們的地方只需添加不需要的水平空間;\dotsc是逗號後省略的正確指令,而後面沒有另一個逗號。

相關內容