命令之后\section
,无论后面是什么,空间量都是相同的。itemize
环境不会添加额外的空间。
如何在自定义环境后实现相同的行为?
\documentclass{article}
\newlength{\postinfoskip}
\setlength{\postinfoskip}{2ex}
\newenvironment{info}
{\itshape}
{\vspace{\postinfoskip}}
\begin{document}
\section{The spacing after this section \dots}
This is a line of text that begins with a normal amount of space after the section heading.
\section{\dots{} is the same as the spacing after this one}
\begin{itemize}
\item First line of text
\item Second line of text
\end{itemize}
\section{But when I use a custom environment \dots}
\begin{info}
See how much space there is after this environment before normal text.
\end{info}
This is a line of text that begins with a normal amount of space after the environment.
\section{\dots{} I can't get consistent spacing after}
\begin{info}
Compare to the amount of space before itemize.
\end{info}
\begin{itemize}
\item First line of text starts after a gap
\item Second line of text
\end{itemize}
\end{document}