调整 LaTeX 中的列表环境时,使用 enumitem 宏包可以方便的调整间距。
调整间距的参数命令包括两类。
1. 垂直间距
- topsep 列表环境与上文之间的距离
- parsep 条目里面段落之间的距离
- itemsep 条目之间的距离
- partopsep 条目与下面段落的距离
2. 水平间距
- leftmargin 列表环境左边的空白长度
- rightmargin 列表环境右边的空白长度
- labelsep 标号与列表环境左侧的距离
- itemindent 条目的缩进距离
- labelwidth 标号的宽度
- listparindent 条目下面段落的缩进距离
举例:
\usepackage{enumitem}
This is an example of enumitem spacing.
\begin{itemize}[itemsep= 15 pt,topsep = 20 pt]
\item first item.
contents.
\item second item.
contents.
\item third item.
contents.
\end{itemize}
效果:
下面一张图清晰的展示了不同间距的含义: