Tx · LaTeX & TikZ

Why Does `\begin{enumerate}[(a)]` Not Indent Items?

Published By the 9to5Science editorial team

At a glance

  1. 1. Separate label and margin

    The optional label format changes how items are marked; it does not by itself set the list's indentation.

  2. 2. Use enumitem

    Load enumitem and set the label and leftmargin options on the enumerate environment.

  3. 3. Choose the spacing

    Use leftmargin=* for a margin suited to the label, or specify a length for a fixed indent.

The [(a)] part specifies how the items are labeled. It is not an instruction to indent the list. In standard LaTeX, enumerate does not accept that optional argument; it is commonly provided by the enumerate package. For new documents, enumitem is a flexible way to set both the label and the list layout.

Set the label and indentation with enumitem

Load enumitem, then set the label format and left margin as list options:

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\begin{enumerate}[label=(\alph*), leftmargin=*]
  \item First item.
  \item Second item, with a longer line that wraps and aligns with the item text.
\end{enumerate}

\end{document}

The label=(\alph*) option makes the labels (a), (b), and so on. The leftmargin=* option asks enumitem to calculate a suitable margin from the label and list settings. Continuation lines align with the item text, rather than starting under the label.

If your document currently loads enumerate, replace it with enumitem rather than loading both packages. The enumitem syntax is not the same as the older package’s syntax.

Choose how far to indent

There are two common goals that can be meant by “indent the items”:

  • Move the item text away from its label: leftmargin=* usually gives the label and text a suitable separation.
  • Move the item text farther into the page: specify a fixed left margin, for example leftmargin=2em. The label may extend to the left of the item text; to shift the label and text together, also set labelindent, for example labelindent=2em, leftmargin=*.

For example, change the list options to:

\begin{enumerate}[label=(\alph*), leftmargin=2em]

The exact spacing depends on the document and the width of the labels. If the list has many items and labels grow to (aa) or beyond, check that the label area is wide enough. enumitem also lets you tune the gap between the label and text with labelsep, such as labelsep=0.5em.

Why the original-looking syntax can be misleading

A label format and a margin are separate list properties. Changing the label from 1. to (a) does not necessarily move the list body to the right by the amount you expect. LaTeX lays out a list using dimensions for the label, the gap after it, and the left margin; changing one does not mean “indent by this much.”

Also, the built-in enumerate environment does not take [(a)] as a standard option. Without a package or class that interprets it as an option, [(a)] may instead be treated as ordinary list content. The older enumerate package uses optional label patterns, while enumitem uses named options such as label=(\alph*) and leftmargin=*.

Common mistakes

  • Using \itemindent to move the whole list. It changes the indentation of the first line of each item, not the overall list margin. Use leftmargin for the list’s position.
  • Changing only the label format. A custom label changes what is printed, not necessarily the indentation you want. Set a margin option too.
  • Loading multiple list-formatting packages. Avoid combining enumerate and enumitem for the same purpose; use one package and its syntax consistently.
  • Expecting the label itself to be indented by leftmargin. List layout includes the label width and label-to-text gap, so the label and item text do not start at the same position. Adjust leftmargin, labelsep, or related enumitem settings to get the alignment you need.

References

  1. enumitem — control layout of itemize, enumerate, and description

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.