我添加了代码来减少之前的间距itemize
。但是,当我使用时,multicols
仍然会添加大量额外的垂直空白(参见子项之前的空格)。
有人知道如何删除它吗?
\documentclass{article}
\usepackage{multicol}
%reduce spacing in itemize, enumerate and titles
\usepackage{enumitem}
\setenumerate{nolistsep}
\setitemize{nolistsep}
\usepackage[compact]{titlesec}
\begin{document}
Some text
\begin{itemize}
\item item 1
\begin{multicols}{2}\begin{itemize}
\item item 1a
\item item 1b
\item item 1c
\item item 1d
\end{itemize}\end{multicols}
\item rest of items
\end{itemize}
Rest of the document
\end{document}
答案1
您可以在本地设置\multicolsep
为(或其他所需值;的0pt
默认值为):\multicolsep
12pt plus 4pt minus 3pt
\documentclass{article}
\usepackage{multicol}
\usepackage{enumitem}
\setenumerate{nolistsep}
\setitemize{nolistsep}
\usepackage[compact]{titlesec}
\begin{document}
Some text
\begin{itemize}
\setlength\multicolsep{0pt}
\item item 1
\begin{multicols}{2}\begin{itemize}[nolistsep]
\item item 1a
\item item 1b
\item item 1c
\item item 1d
\end{itemize}\end{multicols}
\item rest of items
\end{itemize}
Rest of the document
\end{document}