2

i use the itemize environment in my document to make listings. since i don't want the listings to take so much space, i always use \itemsep-10pt. However the gap between the first and second level of the listing doesn't get smaller by using the itemsep-command. how can i get rid of that gap? MWE:

\documentclass{scrreprt}
\begin{document}
\begin{itemize}
\itemsep-10pt
\item first item first lvl
\item second item first lvl
\begin{itemize}
\itemsep-10pt
(HUGE GAP HERE)
\item first item second lvl
\item second item second lvl
\end{itemize}
\end{itemize}
\end{document}
1

1 Answer 1

3

You can use enumitem for that without inserting manual actions

\documentclass{scrreprt}
\usepackage{enumitem,lipsum}
\begin{document}
\lipsum[1]
\begin{itemize}[noitemsep]
\item first item first lvl
\item second item first lvl
\begin{itemize}[nosep]
\item first item second lvl
\item second item second lvl
\end{itemize}
\end{itemize}
\lipsum[2]
\end{document}

See the manual for the difference between noitemsep and nosep options

5
  • this solved the problem, thank you :) is there a way of setting "nosep" as standard setting for all "itemize" environments i use?
    – Max
    Aug 22, 2015 at 16:05
  • 1
    @Max In the preamble: \setlist[itemize,1]{noitemsep} \setlist[itemize,2]{nosep} to maintain percusse's settings or \setlist[itemize]{nosep} to have nosep. Aug 22, 2015 at 16:09
  • thanks to you, too! i don't really see the difference between nosep and noitemsep for the first itemize-lvl. i mean the manual says, nosep "removes all vertical spacing", but is there any other verticalspacing than just the itemsep in the first lvl?
    – Max
    Aug 22, 2015 at 16:18
  • @Max Distance to the surrounding paragraphs etc.
    – percusse
    Aug 22, 2015 at 16:19
  • ok, got all my answers now, thank you very much once again, guys.
    – Max
    Aug 22, 2015 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .