summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-complist.html
blob: af99daac92e33cbcf11c3109168b42e2a2eac1c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<head>
<title>UK TeX FAQ -- question label complist</title>
</head><body>
<h3>How to adjust list spacing</h3>
<p/><a href="FAQ-books.html">Lamport&rsquo;s book</a> lists various
parameters for the layout of list (things like <code>\</code><code>topsep</code>,
<code>\</code><code>itemsep</code> and <code>\</code><code>parsep</code>), but fails to mention that they&rsquo;re set
automatically within the list itself.  This happens because each list
executes a command <code>\</code><code>@list</code><code>&lt;<i>depth</i>&gt;</code> (the depth
appearing as a lower-case roman numeral); what&rsquo;s more, the top-level
<code>\</code><code>@listi</code> is usually reset when the font size is changed.  As a
result, it&rsquo;s rather tricky for 
the user to control list spacing.  Of course, the real answer is to use
a document class designed with more modest list spacing, but we all
know such things are hard to come by.  The <i>memoir</i> class wasn&rsquo;t
designed for more compact lists <em>per se</em>, but offers the user
control over the list spacing.
<p/>There are packages that provide some control of list spacing, but they
seldom address the separation from surrounding text (defined by
<code>\</code><code>topsep</code>).  The <i>expdlist</i> package, among its many controls
of the appearance of <code>description</code> lists, offers a
compaction parameter (see the documentation); the <i>mdwlist</i>
package offers a <code>\</code><code>makecompactlist</code> command for users&rsquo; own list
definitions, and uses it to define compact lists
<code>itemize*</code>, <code>enumerate*</code> and
<code>description*</code>.  In fact, you can write lists such as
these commands define pretty straightforwardly &mdash; for example:
<blockquote>
<pre>
\newenvironment{itemize*}%
  {\begin{itemize}%
    \setlength{\itemsep}{0pt}%
    \setlength{\parskip}{0pt}}%
  {\end{itemize}}
</pre>
</blockquote><p>
The <i>paralist</i> package provides several approaches to list
compaction:
<ul>
<li> its <code>asparaenum</code> environment formats each item as if
  it were a paragraph introduced by the enumeration label (which saves
  space if the item texts are long);
<li> its <code>compactenum</code> environment is the same sort of
  compact list as is provided in <i>expdlist</i> and
  <i>mdwlist</i>; and
<li> its <code>inparaenum</code> environment produces a list &ldquo;in
  the paragraph&rdquo;, i.e., with no line break between items, which is a
  great space-saver if the list item texts are short.
</ul>
The package will manipulate its <code>enumerate</code> environment
labels just like the <a href="FAQ-enumerate.html"><i>enumerate</i> package</a>
does.
<p/><i>Paralist</i> also provides <code>itemize</code> equivalents
(<code>asparaitem</code>, etc.), and <code>description</code>
equivalents (<code>asparadesc</code>, etc.).
<p/>The <i>multenum</i> package offers a more regular form of
<i>paralist</i>&rsquo;s <code>inparaenum</code>; you define a notional
grid on which list entries are to appear, and list items will always
appear at positions on that grid.  The effect is somewhat like that of
the &lsquo;tab&rsquo; keys on traditional typewriters; the package was designed
for example sheets, or lists of answers in the appendices of a book.
<p/>The ultimate in compaction (of every sort) is offered by the
<i>savetrees</i> package; compaction of lists is included.  The
package&rsquo;s prime purpose is to save space at every touch and turn:
don&rsquo;t use it if you&rsquo;re under any design constraint whatever!
<p/>The <i>expdlist</i>, <i>mdwlist</i> and <i>paralist</i>
packages all offer other facilities for list configuration: you should
probably not try the &ldquo;do-it-yourself&rdquo; approaches outlined below if
you need one of the packages for some other list configuration
purpose.
<p/>For ultimate flexibility (including manipulation of <code>\</code><code>topsep</code>), the
<i>enumitem</i> package permits adjustment of list parameters using
a &ldquo;<em>key</em>=&lt;<i>value</i>&gt;&rdquo; format.
For example, one might write
<blockquote>
<pre>
\usepackage{enumitem}
...
\begin{enumerate}[topsep=0pt, partopsep=0pt]
\item ...
\item ...
\end{enumerate}
</pre>
</blockquote><p>
to suppress all spacing above and below your list, or
<blockquote>
<pre>
\usepackage{enumitem}
...
\begin{enumerate}[itemsep=2pt,parsep=2pt]
\item ...
\item ...
\end{enumerate}
</pre>
</blockquote><p>
to set spacing between items and between paragraphs within items.
<i>Enumitem</i> also permits manipulation of the label format in a
more &ldquo;basic&rdquo; (and therefore more flexible) manner than the 
<a href="FAQ-enumerate.html"><i>enumerate</i> package</a> does.
<dl>
<dt><tt><i>enumerate.sty</i></tt><dd>Distributed as part of <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/required/tools.zip">macros/latex/required/tools</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/required/tools/">browse the directory</a>)
<dt><tt><i>enumitem.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/enumitem.zip">macros/latex/contrib/enumitem</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/enumitem/">browse the directory</a>)
<dt><tt><i>expdlist.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/expdlist.zip">macros/latex/contrib/expdlist</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/expdlist/">browse the directory</a>)
<dt><tt><i>memoir.cls</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/memoir.zip">macros/latex/contrib/memoir</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/memoir/">browse the directory</a>)
<dt><tt><i>mdwlist.sty</i></tt><dd>Distributed as part of <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/mdwtools.zip">macros/latex/contrib/mdwtools</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/mdwtools/">browse the directory</a>)
<dt><tt><i>multenum.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/multenum.zip">macros/latex/contrib/multenum</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/multenum/">browse the directory</a>)
<dt><tt><i>paralist.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/paralist.zip">macros/latex/contrib/paralist</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/paralist/">browse the directory</a>)
<dt><tt><i>savetrees.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/savetrees.zip">macros/latex/contrib/savetrees</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/savetrees/">browse the directory</a>)
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=complist">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=complist</a>
</body>