描述 项目 间距

描述 项目 间距

我有以下latex代码:

\documentclass{article}
\begin{document}
\begin{description}
  \item[days] {\footnotesize sunday, monday}
  \item[months] {\footnotesize january, february}
\end{description}
\end{document}

得出的结果为:
在此处输入图片描述

如何才能减少项目之间的间距?

尝试过:

\begin{description}[itemsep=0pt]

这在我的系统(Macbook pro)上编译失败:

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.4   \item[days]
                  {\footnotesize sunday, monday}
?

LaTex 版本:

➜  helloworld git:(master) ✗ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017)
kpathsea version 6.2.3
Copyright 2017 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.29; using libpng 1.6.29
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 3.04

我刚刚开始,我尝试在这个网站和谷歌上搜索,但没能找到答案。如果有人能帮忙我将不胜感激。

答案1

发现了,必须添加包:

\usepackage{enumitem}

相关内容