8
\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?

lockstep
  • 250,273
user31526
  • 749

2 Answers2

12

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.
Mico
  • 506,678
8

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}
cmhughes
  • 100,947