Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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.

share|improve this answer
    
\setitemize{topsep=0pt} - even better that \renewcommand ;) –  Ichibann Nov 20 '11 at 14:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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