File indexing completed on 2024-11-24 04:34:44

0001 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
0002 <html>
0003 <!-- This document is an unofficial reference manual for LaTeX, a
0004 document preparation system, version of November 2018.
0005 
0006 This manual was originally translated from LATEX.HLP v1.0a in the
0007 VMS Help Library.  The pre-translation version was written by
0008 George D. Greenwade of Sam Houston State University.  The
0009 LaTeX 2.09 version was written by Stephen Gilmore.  The
0010 LaTeX2e version was adapted from this by Torsten Martinsen.  Karl
0011 Berry made further updates and additions, and gratefully acknowledges
0012 using Hypertext Help with LaTeX, by Sheldon Green, and
0013 LaTeX Command Summary (for LaTeX 2.09) by
0014 L. Botway and C. Biemesderfer (published by the TeX Users
0015 Group as TeXniques number 10), as reference material.  We also
0016 gratefully acknowledge additional material appearing in
0017 latex2e-reference by Martin Herbert Dietze.  (From these references no
0018 text was directly copied.)
0019 
0020 Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013,
0021 2014, 2015, 2016, 2017, 2018 Karl Berry.
0022 
0023 Copyright 1988, 1994, 2007 Stephen Gilmore.
0024 
0025 Copyright 1994, 1995, 1996 Torsten Martinsen.
0026 
0027 Permission is granted to make and distribute verbatim copies of
0028 this manual provided the copyright notice and this permission notice
0029 are preserved on all copies.
0030 
0031 
0032 Permission is granted to copy and distribute modified versions of this
0033 manual under the conditions for verbatim copying, provided that the entire
0034 resulting derived work is distributed under the terms of a permission
0035 notice identical to this one.
0036 
0037 Permission is granted to copy and distribute translations of this manual
0038 into another language, under the above conditions for modified versions. -->
0039 <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
0040 <head>
0041 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
0042 <title>list (LaTeX2e unofficial reference manual (November 2018))</title>
0043 
0044 <meta name="description" content="list (LaTeX2e unofficial reference manual (November 2018))">
0045 <meta name="keywords" content="list (LaTeX2e unofficial reference manual (November 2018))">
0046 <meta name="resource-type" content="document">
0047 <meta name="distribution" content="global">
0048 <meta name="Generator" content="makeinfo">
0049 <link href="index.html#Top" rel="start" title="Top">
0050 <link href="IndexDocument.html#Index" rel="index" title="Index">
0051 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
0052 <link href="Environments.html#Environments" rel="up" title="Environments">
0053 <link href="_005citem.html#g_t_005citem" rel="next" title="\item">
0054 <link href="letter.html#letter" rel="prev" title="letter">
0055 <style type="text/css">
0056 <!--
0057 /* $Id: latex2e.css 690 2018-09-15 15:20:19Z jimhefferon $
0058    Minor css for latexrefman. Public domain.
0059    Originally written by Jim Hefferon and Karl Berry, 2018. */
0060 
0061 /* So you can style for yourself */
0062 @import url("/css/latexreflocal.css");
0063 
0064 
0065 
0066 a.summary-letter {text-decoration: none}
0067 blockquote.indentedblock {margin-right: 0em}
0068 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
0069 blockquote.smallquotation {font-size: smaller}
0070 div.display {margin-left: 3.2em}
0071 div.example {margin-left: 3.2em}
0072 div.lisp {margin-left: 3.2em}
0073 div.smalldisplay {margin-left: 3.2em}
0074 div.smallexample {margin-left: 3.2em}
0075 div.smalllisp {margin-left: 3.2em}
0076 kbd {font-style: oblique}
0077 pre.display {font-family: inherit}
0078 pre.format {font-family: inherit}
0079 pre.menu-comment {font-family: serif}
0080 pre.menu-preformatted {font-family: serif}
0081 pre.smalldisplay {font-family: inherit; font-size: smaller}
0082 pre.smallexample {font-size: smaller}
0083 pre.smallformat {font-family: inherit; font-size: smaller}
0084 pre.smalllisp {font-size: smaller}
0085 span.nolinebreak {white-space: nowrap}
0086 span.roman {font-family: initial; font-weight: normal}
0087 span.sansserif {font-family: sans-serif; font-weight: normal}
0088 ul.no-bullet {list-style: none}
0089 BODY {
0090   margin-top: 1em;
0091   margin-left: 1em; /* auto results in two-digit <ol> lost off left */
0092   margin-right: 1em;
0093   margin-bottom: 1em;
0094   /* the idea is to use the whole window, unless it is ridiculously
0095      wide, probably with too-small fonts, too.  */
0096   max-width: 64em;
0097 }
0098 
0099 /* Because we want @math{... @code ...} to be upright, not slanted,
0100    and Texinfo won't fix it. */
0101 code {font-style:normal; font-family:monospace; }
0102 
0103 /* We put a link to our own home page at the bottom. */
0104 div.referenceinfo {font-size:small;}
0105 
0106 -->
0107 </style>
0108 
0109 
0110 </head>
0111 
0112 <body lang="en">
0113 <a name="list"></a>
0114 <div class="header">
0115 <p>
0116 Next: <a href="math.html#math" accesskey="n" rel="next">math</a>, Previous: <a href="letter.html#letter" accesskey="p" rel="prev">letter</a>, Up: <a href="Environments.html#Environments" accesskey="u" rel="up">Environments</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="IndexDocument.html#Index" title="Index" rel="index">Index</a>]</p>
0117 </div>
0118 <hr>
0119 <a name="list-1"></a>
0120 <h3 class="section">8.16 <code>list</code></h3>
0121 
0122 <a name="index-environment_002c-list"></a>
0123 <a name="index-list-environment"></a>
0124         
0125 <a name="index-lists-of-items_002c-generic"></a>
0126 
0127 <p>Synopsis:
0128 </p>
0129 <div class="example">
0130 <pre class="example">\begin{list}{<var>labeling</var>}{<var>spacing</var>}
0131   \item[<var>optional label of first item</var>] <var>text of first item</var>
0132   \item[<var>optional label of second item</var>] <var>text of second item</var>
0133   ...
0134 \end{list}
0135 </pre></div>
0136 
0137 <p>An environment for constructing lists.
0138 </p>
0139 <p>Note that this environment does not typically appear in the document
0140 body.  Most lists created by LaTeX authors are the ones that come
0141 standard: the <code>description</code>, <code>enumerate</code>, and <code>itemize</code>
0142 environments (see <a href="description.html#description">description</a>, <a href="enumerate.html#enumerate">enumerate</a>, and <a href="itemize.html#itemize">itemize</a>).
0143 </p>
0144 <p>Instead, the <code>list</code> environment is most often used in macros.  For
0145 example, many standard LaTeX environments that do not immediately
0146 appear to be lists are in fact constructed using <code>list</code>, including
0147 <code>quotation</code>, <code>quote</code>, and <code>center</code> (see <a href="quotation-_0026-quote.html#quotation-_0026-quote">quotation &amp; quote</a>, see <a href="center.html#center">center</a>).
0148 </p>
0149 <p>This uses the <code>list</code> environment to define a new custom
0150 environment.
0151 </p>
0152 <div class="example">
0153 <pre class="example">\newcounter{namedlistcounter}  % number the items
0154 \newenvironment{named}
0155   {\begin{list}
0156      {Item~\Roman{namedlistcounter}.} % labeling 
0157      {\usecounter{namedlistcounter}   % set counter
0158       \setlength{\leftmargin}{3.5em}} % set spacing 
0159   }
0160   {\end{list}}
0161 
0162 \begin{named}
0163   \item Shows as ``Item~I.''
0164   \item[Special label.] Shows as ``Special label.''
0165   \item Shows as ``Item~II.''
0166 \end{named}
0167 </pre></div>
0168 
0169 <p>The mandatory first argument <var>labeling</var> specifies the default
0170 labeling of list items.  It can contain text and LaTeX commands, as
0171 above where it contains both &lsquo;<samp>Item</samp>&rsquo; and &lsquo;<samp>\Roman{&hellip;}</samp>&rsquo;.
0172 LaTeX forms the label by putting the <var>labeling</var> argument in a box
0173 of width <code>\labelwidth</code>.  If the label is wider than that, the
0174 additional material extends to the right.  When making an instance of a
0175 <code>list</code> you can override the default labeling by giving <code>\item</code> an
0176 optional argument by including square braces and the text, as in the
0177 above <code>\item[Special label.]</code>; see <a href="_005citem.html#g_t_005citem">\item</a>.
0178 </p>
0179 <p>The mandatory second argument <var>spacing</var> has a list of commands.
0180 This list can be empty.  A command that can go in here is
0181 <code>\usecounter{<var>countername</var>}</code> (see <a href="_005cusecounter.html#g_t_005cusecounter">\usecounter</a>).  Use this
0182 to tell LaTeX to number the items using the given counter.  The
0183 counter will be reset to zero each time LaTeX enters the environment,
0184 and the counter is incremented by one each time LaTeX encounters an
0185 <code>\item</code> that does not have an optional argument.
0186 </p>
0187 <a name="index-_005cmakelabel"></a>
0188 <a name="list-makelabel"></a><p>Another command that can go in <var>spacing</var> is
0189 <code>\makelabel</code>, which constructs the label box.  By default it puts
0190 the contents flush right.  Its only argument is the label, which it
0191 typesets in LR mode (see <a href="Modes.html#Modes">Modes</a>). One example of changing its
0192 definition is that to the above <code>named</code> example, before the
0193 definition of the environment add
0194 <code>\newcommand{\namedmakelabel}[1]{\textsc{#1}}</code>, and between
0195 the <code>\setlength</code> command and the parenthesis that closes the
0196 <var>spacing</var> argument also add <code>\let\makelabel\namedmakelabel</code>.
0197 Then the labels will be typeset in small caps.  Similarly, changing the
0198 second code line to <code>\let\makelabel\fbox</code> puts the labels inside a
0199 framed box.  Another example of the <code>\makelabel</code> command is below,
0200 in the definition of the <code>redlabel</code> environment.
0201 </p>
0202 <p>Also often in <var>spacing</var> are commands to redefine the spacing for the
0203 list.  Below are the spacing parameters with their default values.
0204 (Default values for derived environments such as <code>itemize</code> can be
0205 different than the values shown here.) See also the figure that follows
0206 the list.  Each is a length (see <a href="Lengths.html#Lengths">Lengths</a>).  The vertical spaces are
0207 normally rubber lengths, with <code>plus</code> and <code>minus</code> components,
0208 to give TeX flexibility in setting the page.  Change each with a
0209 command such as <code>\setlength{itemsep}{2pt plus1pt minus1pt}</code>.
0210 For some effects these lengths should be zero or negative.
0211 </p>
0212 <dl compact="compact">
0213 <dt><code>\itemindent</code>
0214 <a name="index-_005citemindent"></a>
0215 </dt>
0216 <dd><a name="list-itemindent"></a><p>Extra horizontal space indentation, beyond <code>leftmargin</code>, of the
0217 first line each item.  Its default value is <code>0pt</code>.
0218 </p>
0219 </dd>
0220 <dt><code>\itemsep</code>
0221 <a name="index-_005citemsep"></a>
0222 </dt>
0223 <dd><a name="list-itemsep"></a><p>Vertical space between items, beyond the <code>\parsep</code>.  The defaults
0224 for the first three levels in LaTeX&rsquo;s &lsquo;<samp>article</samp>&rsquo;, &lsquo;<samp>book</samp>&rsquo;,
0225 and &lsquo;<samp>report</samp>&rsquo; classes at 10 point size are: <code>4pt plus2pt
0226 minus1pt</code>, <code>\parsep</code> (that is, <code>2pt plus1pt minus1pt</code>), and
0227 <code>\topsep</code> (that is, <code>2pt plus1pt minus1pt</code>).  The defaults at
0228 11 point are: <code>4.5pt plus2pt minus1pt</code>, <code>\parsep</code> (that is,
0229 <code>2pt plus1pt minus1pt</code>), and <code>\topsep</code> (that is, <code>2pt
0230 plus1pt minus1pt</code>).  The defaults at 12 point are: <code>5pt plus2.5pt
0231 minus1pt</code>, <code>\parsep</code> (that is, <code>2.5pt plus1pt minus1pt</code>), and
0232 <code>\topsep</code> (that is, <code>2.5pt plus1pt minus1pt</code>).
0233 </p>
0234 </dd>
0235 <dt><code>\labelsep</code>
0236 <a name="index-_005clabelsep"></a>
0237 </dt>
0238 <dd><a name="list-labelsep"></a><p>Horizontal space between the label and text of an item.
0239 The default for LaTeX&rsquo;s &lsquo;<samp>article</samp>&rsquo;, &lsquo;<samp>book</samp>&rsquo;,
0240 and &lsquo;<samp>report</samp>&rsquo; classes is <code>0.5em</code>.
0241 </p>
0242 </dd>
0243 <dt><code>\labelwidth</code>
0244 <a name="index-_005clabelwidth"></a>
0245 </dt>
0246 <dd><a name="list-labelwidth"></a><p>Horizontal width.  The box containing the label is nominally this wide.
0247 If <code>\makelabel</code> returns text that is wider than this then the first
0248 line of the item will be indented to make room for this extra material.
0249 If <code>\makelabel</code> returns text of width less than or equal to
0250 <code>\labelwidth</code> then LaTeX&rsquo;s default is that the label is typeset
0251 flush right in a box of this width.
0252 </p>
0253 <p>The left edge of the label box is
0254 <code>\leftmargin</code>+<code>\itemindent</code>-<code>\labelsep</code>-<code>\labelwidth</code>
0255 from the left margin of the enclosing environment.
0256 </p>
0257 <p>The default for LaTeX&rsquo;s &lsquo;<samp>article</samp>&rsquo;, &lsquo;<samp>book</samp>&rsquo;, and
0258 &lsquo;<samp>report</samp>&rsquo; classes at the top level is
0259 <code>\leftmargini</code>-<code>\labelsep</code>, (which is <code>2em</code> in one column
0260 mode and <code>1.5em</code> in two column mode).  At the second level it is
0261 <code>\leftmarginii</code>-<code>\labelsep</code>, and at the third level it is
0262 <code>\leftmarginiii</code>-<code>\labelsep</code>.  These definitions make the
0263 label&rsquo;s left edge coincide with the left margin of the enclosing
0264 environment.
0265 </p>
0266 </dd>
0267 <dt><code>\leftmargin</code>
0268 <a name="index-_005cleftmargin-1"></a>
0269 </dt>
0270 <dd><a name="list-leftmargin"></a><p>Horizontal space between the left margin of the enclosing environment
0271 (or the left margin of the page if this is a top-level list), and the
0272 left margin of this list.  It must be non-negative.
0273 </p>
0274 <p>In the standard LaTeX document classes, a top-level list has this set
0275 to the value of <code>\leftmargini</code>, while a list that is nested inside
0276 a top-level list has this margin set to <code>\leftmarginii</code>.  More
0277 deeply nested lists get the values of <code>\leftmarginiii</code> through
0278 <code>\leftmarginvi</code>.  (Nesting greater than level five generates the
0279 error message &lsquo;<samp>Too deeply nested</samp>&rsquo;.)
0280 </p>
0281 <p>The defaults for the first three levels in LaTeX&rsquo;s &lsquo;<samp>article</samp>&rsquo;,
0282 &lsquo;<samp>book</samp>&rsquo;, and &lsquo;<samp>report</samp>&rsquo; classes are: <code>\leftmargini</code> is
0283 <code>2.5em</code> (in two column mode, <code>2em</code>), <code>\leftmarginii</code> is
0284 <code>2.2em</code>, and <code>\leftmarginiii</code> is <code>1.87em</code>.
0285 </p>
0286 </dd>
0287 <dt><code>\listparindent</code>
0288 <a name="index-_005clistparindent"></a>
0289 </dt>
0290 <dd><a name="list-listparindent"></a><p>Horizontal space of additional line indentation, beyond
0291 <code>\leftmargin</code>, for second and subsequent paragraphs within a list
0292 item.  A negative value makes this an &ldquo;outdent&rdquo;.  Its default value
0293 is <code>0pt</code>.
0294 </p>
0295 </dd>
0296 <dt><code>\parsep</code>
0297 <a name="index-_005cparsep"></a>
0298 </dt>
0299 <dd><a name="list-parsep"></a><p>Vertical space between paragraphs within an item.  The defaults for the first three levels in
0300 LaTeX&rsquo;s &lsquo;<samp>article</samp>&rsquo;, &lsquo;<samp>book</samp>&rsquo;, and &lsquo;<samp>report</samp>&rsquo; classes at 10
0301 point size are: <code>4pt plus2pt minus1pt</code>, <code>2pt plus1pt
0302 minus1pt</code>, and <code>0pt</code>.  The defaults at 11 point size are:
0303 <code>4.5pt plus2pt minus1pt</code>, <code>2pt plus1pt minus1pt</code>, and
0304 <code>0pt</code>.  The defaults at 12 point size are: <code>5pt plus2.5pt
0305 minus1pt</code>, <code>2.5pt plus1pt minus1pt</code>, and <code>0pt</code>.
0306 </p>
0307 </dd>
0308 <dt><code>\partopsep</code>
0309 <a name="index-_005cpartopsep"></a>
0310 </dt>
0311 <dd><a name="list-partopsep"></a><p>Vertical space added, beyond <code>\topsep</code>+<code>\parskip</code>, to the top
0312 and bottom of the entire environment if the list instance is preceded by
0313 a blank line.  (A blank line in the LaTeX source before the list
0314 changes spacing at both the top and bottom of the list; whether the line
0315 following the list is blank does not matter.)
0316 </p>
0317 <p>The defaults for the first three levels in LaTeX&rsquo;s &lsquo;<samp>article</samp>&rsquo;,
0318 &lsquo;<samp>book</samp>&rsquo;, and &lsquo;<samp>report</samp>&rsquo; classes at 10 point size are: <code>2pt
0319 plus1 minus1pt</code>, <code>2pt plus1pt minus1pt</code>, and <code>1pt plus0pt
0320 minus1pt</code>.  The defaults at 11 point are: <code>3pt plus1pt minus1pt</code>,
0321 <code>3pt plus1pt minus1pt</code>, and <code>1pt plus0pt minus1pt</code>).  The
0322 defaults at 12 point are: <code>3pt plus2pt minus3pt</code>, <code>3pt plus2pt
0323 minus2pt</code>, and <code>1pt plus0pt minus1pt</code>.
0324 </p>
0325 </dd>
0326 <dt><code>\rightmargin</code>
0327 <a name="index-_005crightmargin"></a>
0328 </dt>
0329 <dd><a name="list-rightmargin"></a><p>Horizontal space between the right margin of the list and the right
0330 margin of the enclosing environment.  Its default value is <code>0pt</code>.
0331 It must be non-negative.
0332 </p>
0333 </dd>
0334 <dt><code>\topsep</code>
0335 <a name="index-_005ctopsep"></a>
0336 </dt>
0337 <dd><a name="list-topsep"></a><p>Vertical space added to both the top and bottom of the list, in addition
0338 to <code>\parskip</code> (see <a href="_005cparindent-_0026-_005cparskip.html#g_t_005cparindent-_0026-_005cparskip">\parindent &amp; \parskip</a>).  The defaults for
0339 the first three levels in LaTeX&rsquo;s &lsquo;<samp>article</samp>&rsquo;, &lsquo;<samp>book</samp>&rsquo;, and
0340 &lsquo;<samp>report</samp>&rsquo; classes at 10 point size are: <code>8pt plus2pt minus4pt</code>,
0341 <code>4pt plus2pt minus1pt</code>, and <code>2pt plus1pt minus1pt</code>.  The
0342 defaults at 11 point are: <code>9pt plus3pt minus5pt</code>, <code>4.5pt
0343 plus2pt minus1pt</code>, and <code>2pt plus1pt minus1pt</code>.  The defaults at 12
0344 point are: <code>10pt plus4pt minus6pt</code>, <code>5pt plus2.5pt minus1pt</code>,
0345 and <code>2.5pt plus1pt minus1pt</code>.
0346 </p>
0347 </dd>
0348 </dl>
0349 
0350 <p>This shows the horizontal and vertical distances.
0351 </p>
0352 <div class="float">
0353 <img src="latex2e-figures/list.png" alt="latex2e-figures/list">
0354 </div>
0355 <p>The lengths shown are listed below.  The key relationship is that the
0356 right edge of the bracket for <var>h1</var> equals the right edge of the
0357 bracket for <var>h4</var>, so that the left edge of the label box is at
0358 <var>h3</var>+<var>h4</var>-(<var>h0</var>+<var>h1</var>).
0359 </p>
0360 <dl compact="compact">
0361 <dt><var>v0</var></dt>
0362 <dd><p><em><code>\topsep</code> + <code>\parskip</code></em> if
0363 the list environment does not start a new paragraph, and
0364 <code>\topsep</code>+<code>\parskip</code>+<code>\partopsep</code> if it does
0365 </p>
0366 </dd>
0367 <dt><var>v1</var></dt>
0368 <dd><p><code>\parsep</code>
0369 </p>
0370 </dd>
0371 <dt><var>v2</var></dt>
0372 <dd><p><code>\itemsep</code>+<code>\parsep</code>
0373 </p>
0374 </dd>
0375 <dt><var>v3</var></dt>
0376 <dd><p>Same as <var>v0</var>.  (This space is affected by whether a blank line
0377 appears in the source above the environment; whether a blank line
0378 appears in the source below the environment does not matter.)
0379 </p>
0380 </dd>
0381 <dt><var>h0</var></dt>
0382 <dd><p><code>\labelwidth</code>
0383 </p>
0384 </dd>
0385 <dt><var>h1</var></dt>
0386 <dd><p><code>\labelsep</code>
0387 </p>
0388 </dd>
0389 <dt><var>h2</var></dt>
0390 <dd><p><code>\listparindent</code>
0391 </p>
0392 </dd>
0393 <dt><var>h3</var></dt>
0394 <dd><p><code>\leftmargin</code>
0395 </p>
0396 </dd>
0397 <dt><var>h4</var></dt>
0398 <dd><p><code>\itemindent</code>
0399 </p>
0400 </dd>
0401 <dt><var>h5</var></dt>
0402 <dd><p><code>\rightmargin</code>
0403 </p>
0404 </dd>
0405 </dl>
0406 
0407 <p>The list&rsquo;s left and right margins, shown above as <var>h3</var> and <var>h5</var>,
0408 are with respect to the ones provided by the surrounding environment, or
0409 with respect to the page margins for a top-level list.  The line width
0410 used for typesetting the list items is <code>\linewidth</code> (see <a href="Page-layout-parameters.html#Page-layout-parameters">Page layout parameters</a>).  For instance, set the list&rsquo;s left margin to be one
0411 quarter of the distance between the left and right margins of the
0412 enclosing environment with
0413 <code>\setlength{\leftmargin}{0.25\linewidth}</code>.
0414 </p>
0415 <p>Page breaking in a list structure is controlled by the three
0416 parameters below. For each, the LaTeX default is
0417 <code>-\@lowpenalty</code>, that is, <code>-51</code>.  Because it is negative,
0418 it somewhat encourages a page break at each spot.  Change it with,
0419 e.g., <code>\@beginparpenalty=9999</code>; a value of 10000 prohibits a
0420 page break.
0421 </p>
0422 <dl compact="compact">
0423 <dt><code>\@beginparpenalty</code>
0424 <a name="index-_005c_0040beginparpenalty"></a>
0425 </dt>
0426 <dd><a name="list-beginparpenalty"></a><p>The page breaking penalty for breaking before the list (default <code>-51</code>).
0427 </p>
0428 </dd>
0429 <dt><code>\@itempenalty</code>
0430 <a name="index-_005c_0040itempenalty"></a>
0431 </dt>
0432 <dd><a name="list-itempenalty"></a><p>The page breaking penalty for breaking before a list item (default <code>-51</code>).
0433 </p>
0434 </dd>
0435 <dt><code>\@endparpenalty</code>
0436 <a name="index-_005c_0040endparpenalty"></a>
0437 </dt>
0438 <dd><a name="list-endparpenalty"></a><p>The page breaking penalty for breaking after a list (default <code>-51</code>).
0439 </p>
0440 </dd>
0441 </dl>
0442 
0443 <a name="index-package_002c-enumitem-1"></a>
0444 <a name="index-enumitem-package-1"></a>
0445 
0446 <p>The package <code>enumitem</code> is useful for customizing lists.
0447 </p>
0448 <p>This example has the labels in red.  They are numbered, and the left
0449 edge of the label lines up with the left edge of the item text.
0450 See <a href="_005cusecounter.html#g_t_005cusecounter">\usecounter</a>.
0451 </p>
0452 <div class="example">
0453 <pre class="example">\usepackage{color}
0454 \newcounter{cnt}  
0455 \newcommand{\makeredlabel}[1]{\textcolor{red}{#1.}}
0456 \newenvironment{redlabel}
0457   {\begin{list}
0458     {\arabic{cnt}}
0459     {\usecounter{cnt}
0460      \setlength{\labelwidth}{0em}
0461      \setlength{\labelsep}{0.5em}
0462      \setlength{\leftmargin}{1.5em}
0463      \setlength{\itemindent}{0.5em} % equals \labelwidth+\labelsep
0464      \let\makelabel=\makeredlabel
0465     }
0466   }
0467 {\end{list} }
0468 </pre></div>
0469 
0470 <table class="menu" border="0" cellspacing="0">
0471 <tr><td align="left" valign="top">&bull; <a href="_005citem.html#g_t_005citem" accesskey="1">\item</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">An entry in a list.
0472 </td></tr>
0473 <tr><td align="left" valign="top">&bull; <a href="trivlist.html#trivlist" accesskey="2">trivlist</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">A restricted form of <code>list</code>.
0474 </td></tr>
0475 </table>
0476 
0477 
0478 
0479 
0480 <hr/><div class='referenceinfo'> <a href='https://latexref.xyz/'> <i>Unofficial LaTeX2e reference manual</i></a></div>
0481 </body>
0482 </html>