Tx · LaTeX & TikZ

How to Add Text Before an Itemize List with enumitem

Published By the 9to5Science editorial team

At a glance

  1. 1. Place the text

    For a one-off heading, write ordinary text immediately before the list environment.

  2. 2. Use the before key

    For text attached to a list, set enumitem’s before option and end the text with a paragraph break.

  3. 3. Customize item labels

    Use label to change each item’s marker; an optional label on an individual item replaces its marker.

If you want text before an itemize list, the simplest solution is to write the text before \begin{itemize}. If you want that text to be part of the list’s formatting, the enumitem package provides a before option.

These approaches put text before the list as a whole. If you mean text before every item’s marker, customize the item label instead.

Put ordinary text before the list

Write a paragraph, then begin the list. This is usually clearest when the text is part of the surrounding prose and appears only once:

Please bring the following items:
\begin{itemize}
  \item A notebook
  \item A pen
\end{itemize}

LaTeX handles the paragraph break between the sentence and the list. You do not need an enumitem option just to place a heading there.

Insert text with enumitem’s before option

The before option runs code before the list begins. It is useful when you want the text and list settings kept together, or when you plan to reuse the same list configuration.

Here is a complete, compilable example:

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\begin{itemize}[
  before={\noindent\textbf{Bring these items:}\par\smallskip},
  label=--,
  leftmargin=*
]
  \item A notebook
  \item A pen
  \item An eraser
\end{itemize}

\end{document}

The before value prints the bold heading, ends its paragraph with \par, and adds a small vertical gap. The braces around the value keep the entire instruction together while enumitem reads the list options. The label=-- option changes the item marker, and leftmargin=* lets enumitem calculate a suitable left margin for that marker.

You can also define a reusable list style with \setlist:

\setlist[itemize]{
  before={\noindent\textbf{Checklist:}\par\smallskip},
  label=--,
  leftmargin=*
}

With this definition in the preamble, each itemize list receives the heading. Use it only if that repeated heading is genuinely wanted; otherwise, the one-off before option or ordinary prose is more appropriate.

If you mean text before each item

To add words before each marker, include them in the label. For example, this numbers items with a word and punctuation before the number:

\begin{enumerate}[label={Step \arabic*:}]
  \item Prepare the ingredients.
  \item Mix them together.
\end{enumerate}

The labels will read “Step 1:” and “Step 2:”. The text after each marker—the item’s body—still begins at \item.

An optional label on a single item, such as \item[Note:], replaces that item’s usual marker. It does not insert text before the marker while keeping the marker unchanged. For consistently formatted labels, prefer the label option.

Common mistakes

  • Putting the heading inside the list by accident: Text after \begin{itemize} but before the first \item is not a normal list item. Put a heading before the environment, or use before.
  • Leaving out the paragraph break: When before inserts a line of text, end it with \par so the list starts in a new paragraph.
  • Using label for a one-time heading: label changes the marker on each item; it does not add a heading above the list.
  • Adding unnecessary complexity: If you only need one sentence before one list, writing the sentence directly before \begin{itemize} is simpler and easier to maintain.

References

  1. enumitem package documentation

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