3

Document 1:

\documentclass[12pt,a4paper]{mwrep}
\usepackage{enumitem}
\begin{document}
List of items:
\begin{itemize}
\item Item one,
\item Item two,
\item Item three
\end{itemize}
\end{document}    

Document 2:

\documentclass[12pt,a4paper]{mwrep}
\begin{document}
List of items:
\begin{itemize}
\item Item one,
\item Item two,
\item Item three
\end{itemize}
\end{document}

Those documents look different because of \usepackage{enumitem} line. I want to use this package (for \setlist[itemize]{label=--}) but I don't want it to change spacing of my lists. How can it be done?

I found on my own that using \begin{itemize}[topsep=0pt] will do what I want. I don't want to add this parameter to every occurence of \begin{itemize} in my document. How can I use \renewcommand to do what I need?

1 Answer 1

6

Set \topsep to 0 pt globally by

\setitemize{topsep=0pt}

With the article class, for example, there would be no difference. if you look at the definition of itemize in mwrep.cls , you see \topsep is set to 0pt by \topsep\z@:

\def\itemize{%
  \ifnum \@itemdepth >\thr@@\@toodeep\else
    \advance\@itemdepth\@ne
    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
    \expandafter
    \list
      \csname\@itemitem\endcsname
      {\partopsep\topsep \topsep\z@ %MW
      \def\makelabel##1{##1\hfil}}%
  \fi}

Seeing this, you could also consider setting

\setitemize{partopsep=\topsep}

before defining 0 pt for topsep.

1
  • \setitemize{topsep=0pt} - even better that \renewcommand ;)
    – Ichibann
    Nov 20, 2011 at 14:22

You must log in to answer this question.

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