![表示数式後の \smallskip がなぜこんなに大きいのでしょうか?](https://rvso.com/image/328459/%E8%A1%A8%E7%A4%BA%E6%95%B0%E5%BC%8F%E5%BE%8C%E3%81%AE%20%5Csmallskip%20%E3%81%8C%E3%81%AA%E3%81%9C%E3%81%93%E3%82%93%E3%81%AA%E3%81%AB%E5%A4%A7%E3%81%8D%E3%81%84%E3%81%AE%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%3F.png)
以下の MWE では、\smallskip
表示計算の後に余分なスペースが追加されているのはなぜですか? (また、これを修正するにはどうすればいいですか?)
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{amsmath}
\begin{document}
This line.
Next line.
\smallskip
Next line after small skip.
\[displaymath\]
Next line.
\[displaymath\]
\smallskip
Next line after small skip.
\end{document}
答え1
良いLaTeX構文は一度もない1行以上の空白行を残す(暗黙的に段落区切りを生成する)前に表示数式グループ。必要に応じて、新しい段落を開始できます。後ディスプレイ数学グループ。
を使用しながら、1 つの displaymath グループの終わりと次の段落の間に過剰な垂直方向の空白が生成されることを避けたい場合は\smallskip
、命令と次の段落の間に空白行を挿入しないようにしてください\smallskip
。
\documentclass[12pt]{article}
\usepackage{amsmath}
\setlength\parindent{0pt} % just for this example
\setlength\textwidth{3in} % just for this example
\begin{document}
This line.
Another line.
\smallskip % no blank line after \smallskip
Line after a smallskip. % no blank line *before* \[...\]
\[\text{displaymath}\]
Line with no smallskip. % no blank line *before* \[...\]
\[\text{displaymath}\]
\smallskip % no blank line after \smallskip
Line after a smallskip.
\end{document}
答え2
表示数式の前後に空白行を使用しないでください。次のように使用します。
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{amsmath}
\begin{document}
This line.
Next line.
\smallskip
Next line after small skip.
%
\[displaymath\]
%
Next line.
%
\[displaymath\]
\smallskip
Next line after small skip.
%
\[displaymath\]
%
Next line after small skip.
\end{document}