![如何删除枚举和逐项列举中两行之间的多余空格?](https://linux22.com/image/389548/%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4%E6%9E%9A%E4%B8%BE%E5%92%8C%E9%80%90%E9%A1%B9%E5%88%97%E4%B8%BE%E4%B8%AD%E4%B8%A4%E8%A1%8C%E4%B9%8B%E9%97%B4%E7%9A%84%E5%A4%9A%E4%BD%99%E7%A9%BA%E6%A0%BC%EF%BC%9F.png)
我正在使用enumerate
并itemize
如下图所示在我的 MWE 中显示。我得到的输出如下图所示。
\documentclass[jou,apacite]{apa6}
\usepackage{enumitem}
\begin{document}
\title{some text}
\begin{enumerate}[leftmargin=*]
\item \textbf{some text}
\begin{itemize}[leftmargin=*]
\item[] some text
\item[] some text
\end{itemize}
\item \textbf{some text}
\begin{itemize}[leftmargin=*]
\item[] some text
\item[] some text
\end{itemize}
\item \textbf{some text}
\begin{itemize}[leftmargin=*]
\item[] some text
\end{itemize}
\end{enumerate}
\end{document}
我想知道是否可以删除两行之间的多余空格?
如果需要,我很乐意提供更多详细信息。
答案1
From the page 12 of the manual:
关键
noitemsep
是消除项目和段落之间的空间 (即itemsep=0pt
和parsep=0pt
),同时nosep
消除所有垂直间距。
\documentclass[jou,apacite]{apa6}
\usepackage{enumitem}
\begin{document}
\title{noitemsep}
\begin{enumerate}[leftmargin=*,noitemsep]
\item \textbf{noitemsep}
\begin{itemize}[leftmargin=*,noitemsep]
\item[] noitemsep
\item[] noitemsep
\end{itemize}
\item \textbf{noitemsep}
\begin{itemize}[leftmargin=*,noitemsep]
\item[] noitemsep
\item[] noitemsep
\end{itemize}
\item \textbf{noitemsep}
\begin{itemize}[leftmargin=*,noitemsep]
\item[] noitemsep
\end{itemize}
\end{enumerate}
\end{document}
\documentclass[jou,apacite]{apa6}
\usepackage{enumitem}
\begin{document}
\title{nosep}
\begin{enumerate}[leftmargin=*,nosep]
\item \textbf{nosep}
\begin{itemize}[leftmargin=*,nosep]
\item[] nosep
\item[] nosep
\end{itemize}
\item \textbf{nosep}
\begin{itemize}[leftmargin=*,nosep]
\item[] nosep
\item[] nosep
\end{itemize}
\item \textbf{nosep}
\begin{itemize}[leftmargin=*,nosep]
\item[] nosep
\end{itemize}
\end{enumerate}
\end{document}
可以考虑这些重复调用:
与\setlist{leftmargin=*, noitemsep}
或\setlist{leftmargin=*, nosep}
\documentclass[jou,apacite]{apa6}
\usepackage{enumitem}
\setlist{leftmargin=*, noitemsep}
\begin{document}
\title{noitemsep}
\begin{enumerate}
\item \textbf{noitemsep}
\begin{itemize}
\item[] noitemsep
\item[] noitemsep
\end{itemize}
\item \textbf{noitemsep}
\begin{itemize}
\item[] noitemsep
\item[] noitemsep
\end{itemize}
\item \textbf{noitemsep}
\begin{itemize}
\item[] noitemsep
\end{itemize}
\end{enumerate}
\end{document}