Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\begin{enumerate}[(i)] 
 \item
\end{enumerate}

This gives the items with roman numbering. But I want to numbering in (i,j) format, i.e. I want my items numbered like (1,2),(1,1), (5,4) etc. What to do?

share|improve this question
    
Wnat is i and what is j? What do they represent? –  Marco Daniel Feb 23 '13 at 14:50
    
@MarcoDaniel: natural numbers –  user31526 Feb 23 '13 at 14:50
    
With one list, why do you want two numbers? –  Paul Gaborit Feb 23 '13 at 15:02
1  
Does \item[(i,j)] help? –  Hendrik Vogt Feb 23 '13 at 15:13
1  
@user31526: To be more specific, does \item[(1,2)] ..., \item[(1,1)] ..., \item[(5,4)] ... help? Just "tell" the \item what numbering you want. –  Hendrik Vogt Feb 23 '13 at 15:24
show 5 more comments

2 Answers

up vote 11 down vote accepted

The following MWE implements a (i) numbering/labeling system for first-level items and an (i,j) numbering/labeling system for second-level items. Here, i and j are arabic numerals.

\documentclass{article}
\renewcommand{\theenumi}{(\arabic{enumi})}
\renewcommand{\theenumii}{(\arabic{enumi},\arabic{enumii})}
\renewcommand{\labelenumi}{\theenumi}
\renewcommand{\labelenumii}{\theenumii}
\makeatletter
\renewcommand{\p@enumii}{}
\makeatother
\begin{document}
\begin{enumerate}
\item First level-one item 
  \begin{enumerate}
  \item First level-two item 
  \item Second level-two item
  \end{enumerate}
\item Second level-one item 
  \begin{enumerate}
  \item Still another level-two item 
  \end{enumerate}
\end{enumerate}
\end{document}

enter image description here

Comments:

  • If you don't wish to adjust the labeling style of the first-level items, just comment out (or delete) the instructions that reset \theenumi and \labelenumi.
  • The instruction \renewcommand{\p@enumii}{} is there to let level-2 items be cross-referenced using the usual \label and \ref method. Because it contains a "special" character (the @ symbol), the instruction has to be "wrapped" inside a pair of \makeatletter and \makeatother instructions.
share|improve this answer
add comment

I always like to use the enumitem package for anything list-related; perhaps it is overkill in this case, but here's one way that it can be done.

\setlist[enumerate,1]{label=(\arabic*)}
\setlist[enumerate,2]{label=(\arabic{enumi}{,}\arabic*)}

The 1 is for 'first-level', and the 2 is for 'second-level'.

screenshot

MWE

\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate,1]{label=(\arabic*)}
\setlist[enumerate,2]{label=(\arabic{enumi}{,}\arabic*)}

\begin{document}
\begin{enumerate}
\item First level-one item 
  \begin{enumerate}
  \item First level-two item 
  \item Second level-two item
  \end{enumerate}
\item Second level-one item 
  \begin{enumerate}
  \item Still another level-two item 
  \end{enumerate}
\end{enumerate}
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.