Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 38 ยท Tables, Figures and Lists

Lists in LaTeX

Create bullet, numbered and description lists in LaTeX with itemize, enumerate and description, nest them, change labels and spacing with enumitem, and avoid common mistakes.

Lists are the simplest structure to write and one of the easiest to get wrong, because every list item needs the right command and every environment must be closed. LaTeX has three list environments, a clean way to nest them, and a package (enumitem) that customizes everything else. This lesson covers all of it.

The three list environments

Environment Items look like Use for
itemize bullets Unordered points
enumerate 1. 2. 3. Steps and ranked items
description term followed by text Glossaries, definitions

Every item starts with \item. The text after it can run over several lines and even several paragraphs.

LATEX
\begin{itemize}
  \item Compile your document.
  \item Read the log.
  \item Fix the \emph{first} error.
\end{itemize}

\begin{enumerate}
  \item Open the editor.
  \item Write the source.
  \item Compile.
\end{enumerate}

\begin{description}
  \item[Engine] The program that turns source into a PDF.
  \item[Package] A bundle of extra commands.
\end{description}

In description, the label goes in square brackets after \item and is printed in bold. In itemize and enumerate, brackets replace the automatic label for one item: \item[$\star$] A special point.

Nesting lists

Put a list inside an item to nest it, up to four levels deep. Each level gets its own label style automatically.

LATEX
\begin{enumerate}
  \item Prepare
  \begin{enumerate}
    \item Install a distribution
    \item Pick an editor
  \end{enumerate}
  \item Write
  \item Publish
\end{enumerate}

Default labels by level:

Level itemize enumerate
1 bullet 1. 2. 3.
2 dash (a) (b) (c)
3 asterisk i. ii. iii.
4 period A. B. C.

Try the same rules below. The stand-in reads a few lines of itemize, enumerate and description source and builds the matching list in HTML with the same labels, so you can see how nesting and \item[...] behave. It is not LaTeX, but the structure rules are identical.

Nested lists (stand-in, not a real compiler)

Delete one \end{enumerate} and compare with the real compiler: it reports "\begin{enumerate} on input line ... ended by \end{document}". Unclosed environments are the most common list error.

Changing labels and spacing with enumitem

For anything beyond the defaults, load enumitem:

LATEX
\usepackage{enumitem}

Options go in square brackets after \begin{...}.

LATEX
\begin{enumerate}[label=\alph*)]            % a) b) c)
\begin{enumerate}[label=\textbf{Step \arabic*.}]   % Step 1. Step 2.
\begin{enumerate}[start=5]                  % begin at 5
\begin{itemize}[label=$\triangleright$]     % custom bullet
\begin{itemize}[noitemsep]                  % no vertical space between items
\begin{itemize}[leftmargin=*]               % compact indent
\begin{description}[style=nextline]         % description text below the label

Counter commands for labels: \arabic*, \alph*, \Alph*, \roman*, \Roman*. You can set defaults for the whole document with \setlist[itemize]{noitemsep, topsep=2pt}, and combine options with commas.

Spacing without a package

The classic quick fix is to put \setlength{\itemsep}{0pt} or \setlength{\parskip}{0pt} inside a group around the list. enumitem is cleaner and local:

LATEX
\begin{itemize}[nosep]
  \item Tight
  \item list
\end{itemize}

Cross-referencing items

Number items automatically and refer to them by label, just like sections:

LATEX
\begin{enumerate}
  \item Install LaTeX. \label{step:install}
  \item Write a file.
\end{enumerate}
Do step~\ref{step:install} first.

Place \label after \item, never before. Cross-references get their own chapter later.

Paragraphs and displays inside lists

Items can contain full paragraphs (leave a blank line), equations, and verbatim text if the list is not nested too deeply.

LATEX
\begin{itemize}
  \item The area of a circle is
  \[ A = \pi r^2. \]
  \item The circumference is $2\pi r$.
\end{itemize}

If a paragraph inside an item is a long sentence with a break, indent it in the source for readability; indentation is ignored by LaTeX.

Inline and compact lists

A list that fits in one sentence ("the options are (a) fast, (b) cheap and (c) good") can use enumerate* from enumitem with the itemjoin key, or just plain text with labels. Lists are for scanning; do not use them for a sentence that reads better as a sentence.

Common mistakes

  • Text before the first \item inside a list: "Something's wrong--perhaps a missing \item."
  • Forgetting to close an environment, or closing in the wrong order.
  • More than four nested levels: "Too deeply nested".
  • Using empty lines between items for spacing: add \itemsep or use enumitem instead.
  • Typing - or * as bullets by hand: use itemize so the list is real structure.
  • An empty list: LaTeX needs at least one \item.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which environment gives numbered items?

    enumerate numbers its items; itemize uses bullets; description uses your labels.
  2. 2. How do you write a description list entry for the term Engine?

    The label goes in square brackets after \item; it prints in bold.
  3. 3. Which package lets you write [label=\alph*)] in a list?

    enumitem adds keys such as label, start, noitemsep and leftmargin.
  4. 4. What is the default label style of a level-2 enumerate list?

    Levels use 1., (a), i. and A. in that order.

Summary

  • itemize, enumerate and description create lists; every entry starts with \item.
  • Lists nest up to four levels with automatic labels.
  • \item[label] overrides a label, and is how description gets its terms.
  • enumitem changes labels, numbering, spacing and margins with keys such as label= and noitemsep.
  • Always close environments in matching order.

Next: Tables in LaTeX