[OS X TeX] vertical space in enumeration

Bruno Voisin bvoisin at mac.com
Wed Apr 2 00:25:07 CEST 2008


Le 1 avr. 08 à 22:42, Alan Munn a écrit :

> At 10:22 PM +0200 4/1/08, Roussanka Loukanova wrote:
>
>> On Tue, 1 Apr 2008, Chris Goedde wrote:
>>
>>> These are controlled by \topsep, \parsep, and \itemsep, so you can  
>>> do something like:
>>>
>>> \setlength{\parsep}{0pt}
>>> \setlength{\topsep}{0pt}
>>> \setlength{\itemsep}{0pt}
>>>
>>> There's a nice figure in The LaTeX Companion that shows all this  
>>> (Figure 3.5 in my old edition).
>>
>> Yes, I see it too, in the same old edition. But, irritatingly, the  
>> above commands have no effect for some reason.
>
> This is because they are automatically set at the beginning of each  
> list, and so adjusting them globally doesn't help.

This isn't fully true. When processing \begin{document}, LaTeX  
executes a series a commands including \@listi, which sets parameters  
for first-level lists (lists within normal text), \@listii which sets  
parameters for second-level lists (lists within lists), and so forth  
up to \@listvi.

You can adjust this for example by putting in a document's preamble  
redefinitions like

\makeatletter
\AtBeginDocument{%
   \renewcommand{\@listi}
     {\setlength{\leftmargin}{\leftmargini}
      \setlength{\topsep} {0pt}
      \setlength{\parsep} {\parskip}
      \setlength{\itemsep}{0pt}}
   \renewcommand{\@listii}
     {\setlength{\leftmargin}{\leftmarginii}
      \setlength{\labelwidth}{\leftmarginii}
      \addtolength{\labelwidth}{-\labelsep}
      \setlength{\topsep} {0pt}
      \setlength{\parsep} {\parskip}
      \setlength{\itemsep}{0pt}}}
\makeatother

Beware, though, that this won't affect text set in \small size or  
\footnotesize (because \small redefines \@listi and so does  
\footntesize).

Bruno Voisin


More information about the macostex-archives mailing list