Document ClassesQuestion on use of "enumerate"

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
georgevi
Posts: 2
Joined: Fri Jul 30, 2010 7:20 pm

Question on use of "enumerate"

Post by georgevi »

I wonder if anybody here knows how to create a list labeled by (1), (2), (3) ...
I tried
\begin{enumerate}[{(1)}]
\item
\item
\end{enumerate}

and it doesn't work for me.

If I use
\begin{enumerate}
\item
\item
\end{enumerate}


It only produces lists like, 1, 2, 3,...

Thanks,
George

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Question on use of "enumerate"

Post by torbjorn t. »

Use the enumitem package.

Code: Select all

\documentclass[a4paper]{article}
\usepackage[shortlabels]{enumitem}
\begin{document}
\begin{enumerate}[(1)]
  \item One
  \item Two
  \item Three
\end{enumerate}
\end{document}
georgevi
Posts: 2
Joined: Fri Jul 30, 2010 7:20 pm

Re: Question on use of "enumerate"

Post by georgevi »

Thank you so much! It works~
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Question on use of "enumerate"

Post by Stefan Kottwitz »

Hi George,

with enumitem you can set this enumeration style globally:

Code: Select all

\documentclass[a4paper]{article}
\usepackage{enumitem}
\setenumerate[1]{label=(\arabic*)}
\begin{document}
\begin{enumerate}
  \item One
  \item Two
  \item Three
\end{enumerate}
\end{document}
I prefer \setenumerate because it sets the style in the preamble for the whole document instead of doing it several times in the document like \begin{enumerate}[(1)]. Specifying the style in the preamble is consistent and changes would be easy.

Stefan
LaTeX.org admin
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

Question on use of "enumerate"

Post by Montag »

You could also put

Code: Select all

%enumeration FIRST level with right parentheses
\renewcommand{\theenumi}{\arabic{enumi}}
\renewcommand{\labelenumi}{\theenumi{)}}
in the preamble and every enumeration item on the first leve lwould be with a ")". Maybe you could use that to include a "(".
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Question on use of "enumerate"

Post by Stefan Kottwitz »

Arabic is the default, so redefining \labelenumi would be sufficient then:

Code: Select all

\renewcommand{\labelenumi}{(\theenumi)}
Stefan
LaTeX.org admin
Post Reply