Tx · LaTeX & TikZ

How to Use \item in a LaTeX trivlist

Published By the 9to5Science editorial team

At a glance

  1. 1. Start the list

    Open a trivlist environment with \begin{trivlist}.

  2. 2. Start an item

    Use \item for an unlabeled entry, or \item[Label] to supply a custom label.

  3. 3. Close the list

    End the environment with \end{trivlist}; do not leave text before the first item.

The trivlist environment is a simple LaTeX list, often used to build theorem-like or other custom environments. The \item command begins an entry in that list. You can leave the entry unlabeled or give it a label in square brackets.

Basic syntax

Use \item before the text of every entry:

\begin{trivlist}
  \item First entry.
  \item Second entry.
\end{trivlist}

A trivlist does not display bullets or numbers by default. It is useful when you want list spacing and indentation, but do not want a standard item marker. To provide a label, put it in the optional argument:

\item[Remark] This entry has a label.

The square brackets are part of the \item syntax; they are not ordinary text. If you want the label to include punctuation or formatting, put that in the brackets, for example \item[\textbf{Remark.}].

A complete example

This document defines a small environment that uses a custom label. The trivlist opens when the environment begins, and \item starts its entry.

\documentclass{article}

\newenvironment{remark}
  {\begin{trivlist}\item[\textbf{Remark.}]}
  {\end{trivlist}}

\begin{document}

\begin{remark}
This text follows the label and forms the body of the remark.
\end{remark}

\end{document}

The example needs no additional packages. The optional label is set in bold, while the text after the environment begins becomes the item’s content. If you want no visible label, use \item[] instead. In a plain trivlist, \item without brackets also starts an unlabeled entry.

Why LaTeX requires an item

A list is structured as a sequence of items, not as an ordinary paragraph environment. The first \item tells LaTeX where the list content starts. If you write text directly after \begin{trivlist} without starting an item, LaTeX may report an error such as “Something’s wrong—perhaps a missing \item.”

Likewise, \item is not a command that takes the entry text as a mandatory argument. Write \item Entry text, not \item{Entry text} as a special item syntax. Braces can still group text for normal TeX reasons, but the item command itself is followed by the content in the document stream.

You can include more than one entry by adding more \item commands before \end{trivlist}. If your goal is a regular bulleted or numbered list, use itemize or enumerate instead. For theorem statements, a theorem package such as ntheorem or LaTeX’s \newtheorem may be more appropriate than defining the layout manually with trivlist.

Common mistakes

  • Leaving out the first \item: Put an item command before any text inside the list.
  • Using braces for a label: The optional label goes in square brackets: \item[Label].
  • Expecting a bullet: trivlist has no default bullet or number. Choose itemize, enumerate, or a custom label if you need one.
  • Putting a paragraph before the item: Keep the list structure consistent and start the entry with \item.
  • Using low-level list code unnecessarily: For a standard theorem, prefer \newtheorem or a theorem package so numbering and spacing are handled for you.

References

  1. LaTeX2e unofficial reference manual: List structures

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