\documentclass{scrreport}
\usepackage[onehalfspacing]{setspace}
\begin{document}
Sample text:
\begin{itemize}
\setlength{\itemsep}{0pt}
\setlength{\partopsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\topsep}{0pt}
\item Sample
\item Another one
\end{itemize}
Ending one.
Paragraph.
Another one.
\end{document}
我得到:
我们可以看到,列表和文本之间的间距大于段落之间的间距。
答案1
使用包,enumitem
您可以使用 删除单个列表的垂直空间\begin{itemize}[nosep]
。
例子:
\documentclass{scrreport}
\usepackage[onehalfspacing]{setspace}
\usepackage{enumitem}
\begin{document}
Sample text:
\begin{itemize}[nosep]
\item Sample
\item Another one
\end{itemize}
Ending one.
Paragraph.
Another one.
\end{document}
itemize
要删除所有环境中的垂直空间,请使用\setlist[itemize]{nosep}
.\setlist{nosep}
删除所有列表的垂直空间。
例子:
\documentclass{scrreport}
\usepackage[onehalfspacing]{setspace}
\usepackage{enumitem}
\setlist{nosep}% or \setlist[itemize]{nosep}
\begin{document}
Sample text:
\begin{itemize}
\item Sample
\item Another one
\end{itemize}
Ending one.
Paragraph.
Another one.
\end{document}
您还可以定义一个新列表并nosep
为此列表设置。有关更多信息,请参阅包文档。
例子:
\documentclass{scrreport}
\usepackage[onehalfspacing]{setspace}
\usepackage{enumitem}
\newlist{myitemize}{itemize}{1}
\setlist[myitemize]{nosep,label=\textbullet}
\begin{document}
Sample text:
\begin{myitemize}
\item Sample
\item Another one
\end{myitemize}
Ending one.
Paragraph.
Another one.
\end{document}
答案2
尝试使用类(和类memoir
的超集)。book
report
% listspaceprob.tex SE 651085
%\documentclass{scrreport}
\documentclass{memoir}
\usepackage{comment}
%\usepackage[onehalfspacing]{setspace}
\OnehalfSpacing
\begin{document}
Sample text:
\tightlists % no extra spaces in/around lists
\begin{itemize}
\item Sample
\item Another one
\end{itemize}
Ending one.
Paragraph.
Another one.
\end{document}
[![enter co[![enter image description here][1]][1]de here][1]][1]