常见的有三 … 阅读全文
常见的有三种:
有序列表 enumerate
\begin{enumerate}
\item This is the first item
\item This is the second item
\item This is the third item
\end{enumerate}
语法和之前提到的内容是类似的,\item 表示列表项开始了。排版试卷的时候经常会用到\item。
圆点标签 itemize
\begin{itemize}
\item This is the first item
\item This is the second item
\item This is the third item
\end{itemize}
解说列表 description,可以指定标签
%\usepackage{pifont}
\begin{description}
\item[\ding{47}] This is the first item
\item[\ding{47}] This is the second item
\item[\ding{47}] This is the third item
\end{description}
列表环境也可以互相嵌套,默认情况下不同层级的标签不同,以体现分级层次。
上述三种列表都是基于 list 列表环境定制的,也就是说 list 环境是功能最强大的列表环境,只是由于它使用起来比较麻烦,所以很少被使用。其实上述的三种列表在通过一定的扩展后可以产生许多样式的列表,这些基本就可以满足平时的需要了。下面说一下怎么进行功能扩展。enumitem 宏包可以对 enumerate、itemize 和 description 环境进行功能扩展,并且提供了简便的语法。enumitem 宏包允许用户在上述三种列表中通过 key=value 的键值方式进行设置。可选的设置项包括:
-
垂直距离
– topsep
– partopsep
– parsep
– itemsep -
水平距离
– leftmargin
– rightmargin
– listparindent
– labelwidth
– labelsep
– itemindent
这些距离的含义可以从图示中清楚的反映出来,更详细的说明可以参看 enumitem 宏包的说明文档。
根据不同需求的场景,需要使用的列表样式也不同。 收起
