[OS X TeX] vertical space in enumeration

Chris Goedde cgg.lists at gmail.com
Wed Apr 2 00:36:22 CEST 2008


On Apr 1, 2008, at 3:22 PM, Roussanka Loukanova wrote:

> Yes, I see it too, in the same old edition. But, irritatingly, the  
> above commands have no effect for some reason. Only the 1st of the  
> following commands makes the difference as of Figure 3.5:
>
> \setlength{\partopsep}{0pt}
> \setlength{\parskip}{0pt}
> \setlength{\parsep}{0pt}
> \setlength{\topsep}{0pt}
> \setlength{\itemsep}{0pt}
> \begin{document}
> ...

Oh, I'd forgotten that they might need to be put in a particular  
place. Alan and Bruno have provided answers, but what I do is just use  
\newenvironment to create a new list environment and stick them in  
there. Something like:

\newcounter{problemnum}

\newenvironment{problems}%
{\begin{list}{\textbf{(\arabic{problemnum})}}{%
	\usecounter{problemnum}%
}}{\end{list}}

\newenvironment{compactproblems}%
{\begin{list}{\textbf{(\arabic{problemnum})}}{%
	\usecounter{problemnum}%
	\setlength{\parsep}{0pt}%
	\setlength{\topsep}{0pt}%
	\setlength{\itemsep}{0pt}%
}}{\end{list}}

Then I just use the first environment when I want the regular list  
spacing and the second when I want minimal spacing. I think I learned  
how to do this in The LaTeX Companion.

-- 
Chris





More information about the macostex-archives mailing list