Text FormattingCustom Labels in enumerated List

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Custom Labels in enumerated List

Post by Laurentius »

Is it possible to get the numbers in parentheses without writing them out explicitly?

Code: Select all

\begin{enumerate}
\baselineskip=12pt
\item [(1)] πρᾶξις is caused by virtue (or vice).
\item [(2)] πρᾶξις is possible without βούλευσις.
\item [(3)] Virtue (and vice) is ἕξις προαιρετική. (II.6)
\item [(4)] There can be no προαίρεσις without βούλευσις. (13^a2--5)
\item [(5)] There can be no virtue without βούλευσις. \{1,3,4\}
\item [(6)] 0 = 1. \{1,2,5\} 
\end{enumerate}

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Custom Labels in enumerated List

Post by Stefan Kottwitz »

Yes, you can do it with \label and \ref.

Stefan
LaTeX.org admin
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Re: Custom Labels in enumerated List

Post by Laurentius »

Sorry, but I don't get it.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Custom Labels in enumerated List

Post by Stefan Kottwitz »

Well, assumed you meant the numbers in parenthesis within the item texts, there I would use \ref.

However, I understand that you would like to change the enumerate labels to have parentheses. No problem:

Code: Select all

\usepackage{enumitem}
\setenumerate[1]{label=(\arabic*)}
Then just use \item.

Stefan
LaTeX.org admin
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Custom Labels in enumerated List

Post by Juanjo »

Laurentius wrote:Is it possible to get the numbers in parentheses without writing them out explicitly?
Which ones? (1), (2),... labeling the items? If this were the case, load the enumitem package. Then write:

Code: Select all

\begin{enumerate}[label=(\arabic*),itemsep=5pt]
\item πρᾶξις is caused by virtue (or vice).
\item πρᾶξις is possible without βούλευσις.
\item Virtue (and vice) is ἕξις προαιρετική. (II.6)
\item There can be no προαίρεσις without βούλευσις. (13\^{}a2--5)
\item There can be no virtue without βούλευσις. \{1,3,4\}
\item 0 = 1. \{1,2,5\} 
\end{enumerate}
Edited: Stefan, you've been quicker. Anyway, the solution I provide is useful if one wants just to modify a particular enumerate environment, not all of them.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm

Custom Labels in enumerated List

Post by alainremillard »

There is an easier way. You can simply put your first label between square bracket. The {enumerate} environment will do the rest for you

Code: Select all

\begin{enumerate}[(1)]
\item πρᾶξις is caused by virtue (or vice).
\item πρᾶξις is possible without βούλευσις.
\item Virtue (and vice) is ἕξις προαιρετική. (II.6)
\item There can be no προαίρεσις without βούλευσις. (13\^{}a2--5)
\item There can be no virtue without βούλευσις. \{1,3,4\}
\item 0 = 1. \{1,2,5\} 
\end{enumerate}
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Custom Labels in enumerated List

Post by Juanjo »

alainremillard wrote:There is an easier way. You can simply put your first label between square bracket. The {enumerate} environment will do the rest for you
Well, not really... unless you load enumitem with the shortlabels option.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm

Custom Labels in enumerated List

Post by alainremillard »

Juanjo wrote: Well, not really... unless you load enumitem with the shortlabels option.
I use the enumerate package. The following code give an answer to the question.

Code: Select all

\documentclass[11pt]{article}

\usepackage{enumerate}

\begin{document}

\begin{enumerate}[(1)]
	\item Item 1
	\item Item 2
	\item Item 3
	\item Item 4
\end{enumerate}

\end{document}  
I didn't know until now that the enumerate package was out-of-date... I will have to learn the enumitem.
Post Reply