Text FormattingReference Enumeration

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
dennetik
Posts: 2
Joined: Sun Apr 04, 2010 3:12 pm

Reference Enumeration

Post by dennetik »

I have the following bit of code:

Code: Select all

\begin{enumerate}
\renewcommand{\labelenumi}{(\roman{enumi})}
\item{\label{AA} Text}
\item{\label{BB} Text}
\item{\label{CC} Text}
\end{enumerate}
Which renders as an enumeration with lowercase roman numerals.
If I wish to reference, for example, the first item, the reference renders as a simple number, not a roman numeral.

How can I correct this?
Last edited by dennetik on Sun Apr 04, 2010 4:01 pm, edited 1 time in total.

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

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

Reference Enumeration

Post by localghost »

It's best to post always a full example.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}
  \begin{enumerate}
    \renewcommand{\theenumi}{(\roman{enumi})}
    \renewcommand{\labelenumi}{\theenumi}
    \item \label{AA} Text
    \item \label{BB} Text
    \item \label{CC} Text
  \end{enumerate}
	
	Item \ref{AA}
\end{document}
If this solves your problem, please mark the topic as solved by editing your first post and choosing the green checkmark from the icon list.


Best regards and welcome to the board
Thorsten
dennetik
Posts: 2
Joined: Sun Apr 04, 2010 3:12 pm

Re: Reference Enumeration

Post by dennetik »

Thank you, that solves the problem.
Post Reply