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}
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

  • 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 '15 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. – Gonzalo Medina Aug 22 '15 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 '15 at 16:18
  • @Max Distance to the surrounding paragraphs etc. – percusse Aug 22 '15 at 16:19
  • ok, got all my answers now, thank you very much once again, guys. – Max Aug 22 '15 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.