Text FormattingEnumerated List with Math Expression in Item Labels

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
mayngontay
Posts: 6
Joined: Thu May 29, 2008 9:45 am

Enumerated List with Math Expression in Item Labels

Post by mayngontay »

Hi,

I would like to have a numbered list like this.
Capture2.PNG
Capture2.PNG (14.52 KiB) Viewed 3661 times
I use the following code:

Code: Select all

\documentclass{article}
\usepackage{enumerate}
\begin{document}
 \begin{enumerate}[$({q}_1)$]
  \setcounter{enumi}{9}
  \item first item.
  \item second item.
  \item third item.
  \item fourth item.
  \item fifth item.
 \end{enumerate}
\end{document}
But the above code generates the following result which is not my expectation (look at the number).
Capture.PNG
Capture.PNG (14.61 KiB) Viewed 3661 times
Please help, thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Enumerated List with Math Expression in Item Labels

Post by localghost »

The enumerate package is considered obsolete and is superseded by enumitem. Then the solution becomes quite easy.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{enumitem}

\begin{document}
  \begin{enumerate}[label={$(q_{\arabic*})$}]
    \setcounter{enumi}{9}
    \item first item.
    \item second item.
    \item third item.
    \item fourth item.
    \item fifth item.
  \end{enumerate}
\end{document}
Click on "Open in writeLaTeX" in the head of the above code box to see the resulting output instantly.


Thorsten
Post Reply