I was wondering if there was a command to find what at what depth of the enum
counter (i.e. enumi
, enumii
, etc.) a command was at compile time. I'm attempting to create a \question
command. What I have so far:
\newcommand{\question}[2][\value{enumi}+1]{\setcounter{enumi}{#1-1} \item \textbf{#2}}
Which works great for the first level (Note: requires the calc
package). What I'm looking for is a command (or series of commands) to replace the \value{enumi}+1
with whatever the current depth is so that something like:
\begin{enumerate}
\question{Whatever}
\question[10]{Blah}
\begin{enumerate}
\question[2]{Stuff}
\end{enumerate}
\end{enumerate}
would produce output like:
1. Whatever
10. Blah
(b). Stuff