summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/latex2e-html/ltx-260.html
blob: f89f998f05cd02e8440806bc64a832f15ebc1ca8 (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
<html>
<head><title>Help On LaTeX list enviroment</title></head>
<body bgcolor="#ffffff" text="#000000" link="#000099" vlink="#cc0000" alink="#cc0000">
<h1><font size="-2">Hypertext Help with LaTeX</font><br><font color="#cc0000">list</font></h1>
<p>
<p><pre>
 <tt>\begin{list}{label}{spacing}
 \item First item
 \item Second item
 ....
 \end{list}</tt>
</pre>
 The <tt>label</tt>  argument  specifies  the <em>default</em> label for items 
 in the list; it may be overriden with the optional argument of the 
 <a href="item.html"><tt>\item</tt></a> command.  It is
 a piece  of text that  is inserted  in a box to form  the
 label.   This  argument  can and  usually  does  contain  other  LaTeX
 commands.
<p>
 The  <tt>spacing</tt>  argument  contains  commands  to  change  the  spacing
 parameters  for the list.  This argument will most often be null, i.e.
 <tt>{}</tt>.  This will select default spacings, which depends on the 
 <a href="ltx-22.html">document style</a> and options, and   
 which should  suffice  for
 most cases. However, the commands which can be put here are
<ul>
<li><tt>\topsep</tt> amount of extra vertical space at top of list
<li><tt>\partopsep</tt> extra length at top if environment is prececed
  by a blank line (it should be a <a href="ltx-86.html#rubber">rubber length</a>)
<li><tt>\itemsep</tt> amount of extra vertical space between items
<li><tt>\parsep</tt> amount of vertical space between paragraphs <em>within</em>
  an item
<li><tt>\leftmargin</tt> horizontal distance between the left margins of
  the environment and the list; must be nonnegative
<li><tt>\rightmargin</tt> horizontal distance betwen the right margins of
  the enviroment and the list; must be nonnegative
<li><tt>\listparindent</tt> amount of extra space for paragraph indent <em>after
  the first</em> in an item; can be negative
<li><tt>\itemindent</tt> indentation of first line of an item; can be negative
<li><tt>\labelsep</tt> separation between end of the box containing the label
  and the text of the first line of an item
<li><tt>\labelwidth</tt> normal width of the box containing the label; if the
  actual label is bigger, the natural width is used, extending into the
  space for the first line of the item's text
<li><tt>\makelabel{label}</tt> generates the label printed by the 
  <tt>\item</tt> command
<p>
<li><a href="ltx-338.html"><tt>\usecounter{ctr}</tt></a> 
  enables the counter <tt>ctr</tt> to be used
 for numbering items; it is initialized to zero and stepped when
 executing an <tt>\item</tt> command that has no optional <tt>label</tt> 
 argument.
</ul>

<h2><a name="example">An Example</a></h2>
An simple example of things that can be done with the List Enviroment
will illustrate typical usage of the arguments.  The following will
make a list numbered by "Item-#", where the # is an upper case 
Roman numeral, and will indent the right margin the same 
as the left margin (it is not normally indented in most styles).
<pre>
  <tt>%    define "Lcount" as a counter
  <a href="ltx-271.html">\newcounter</a>{Lcount}
  %    set the "default" label to print counter as a Roman numeral 
  \begin{list}{Item-<a href="ltx-305.html">\Roman</a>{Lcount}}
  %    inform the list command to use this counter
    {<a href="ltx-338.html">\usecounter</a>{Lcount}
  %    set rightmargin equal to leftmargin
    <a href="ltx-88.html">\setlength</a>{\rightmargin}{\leftmargin}}
  %    we can now begin the "items"
  <a href="item.html">\item</a> This is the first item
  \item And this is the second item
  \end{list}</tt>
</pre>
Note that this would produce something like:
<pre>
     Item-I  This is the first item
     Item-II And this is the second item
</pre>
<hr>
See <a href="lists.html">Lists</a>,
 <a href="ltx-27.html">Environments</a>,
 <a href="ltx-3.html">Counters</a>, 
 <a href="ltx-86.html">Lenghts</a><br>
See also <a href="item.html"><tt>\item</tt></a><br>
Back to the <a href="ltx-2.html">LaTeX Table of Contents</a>
<hr>
<address>
Revised: Sheldon Green, 23 Oct 1995.
</address>
</body>
</html>