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.

How can I do a nested enumeration with item being skipped, like this:

1) Level 1
 A) sublevel A
  i) sublevel i
   a) sublevel a

2) Level 1 [here are the skipped \item]
   a) sublevel a
   b) sublevel a

3) Level 1
 A) sublevel A
   a) sublevel a
   b) sublevel a
 B) sublevel A
  i) sublevel i
   a) sublevel a
 ii) sublevel i

I tried something like this, unsuccessfully:

\begin{enumerate}
  \item
  \begin{enumerate}
    \begin{enumerate}
     ...
    \end{enumerate} 
  \end{enumerate}
  \item
\end{enumerate}
share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

If you want to skip the use of an itemizing something in a nested list while still maintaining the indentation, you can use \item[] to override the labelling and therefore obtain a label-less \item. The following produces exactly the nesting and labelling you're after:

\documentclass{article}
\usepackage[shortlabels]{enumitem}

\begin{document}
\begin{enumerate}[1)]
  \item Level 1
  \begin{enumerate}[A)]
    \item sublevel A
    \begin{enumerate}[i)]
      \item sublevel i
       \begin{enumerate}[a)]
         \item sublevel a
       \end{enumerate}
    \end{enumerate}
  \end{enumerate}

  \item Level 1 [here are \textbf{two} skipped sublevel \verb|\item|s]
    \begin{enumerate}[A)]
      \item[]% Empty item (nesting kept)
      \begin{enumerate}[i)]
        \item[]% Empty item (nesting kept)
        \begin{enumerate}[a)]
          \item sublevel a
          \item sublevel a
        \end{enumerate}
      \end{enumerate}
    \end{enumerate}

  \item Level 1
  \begin{enumerate}[A)]
    \item sublevel A [here is \textbf{one} skipped sublevel \verb|\item|]
    \begin{enumerate}[i)]
      \item[]% Empty item (nesting kept)
      \begin{enumerate}[a)]
        \item sublevel a
        \item sublevel a
      \end{enumerate}
    \end{enumerate}
    \item sublevel A
    \begin{enumerate}[i)]
      \item sublevel i
      \begin{enumerate}[a)]
        \item sublevel a
      \end{enumerate}
      \item sublevel i
    \end{enumerate}
  \end{enumerate}
\end{enumerate}
\end{document}​

Nested enumerate environment with some item skipping while preserving nesting

The biggest thing to maintain the structure is to keep your code using a uniform indentation. That way you can easily see at which level certain items are. Of course, (La)TeX has no concern with this as long as your groups are well-ordered. However, debugging code could be messy if the indentation is lacking.

share|improve this answer
    
That is exactly I was looking for: the blank item \item[]. Thank you! –  Mihai Terente Aug 10 '11 at 7:49
add comment

Is this what you mean?

\documentclass{article}
\usepackage[shortlabels]{enumitem}

\begin{document}
\begin{enumerate}[1)]
\item Level 1
\begin{enumerate}[A)]
    \item sublevel A
    \begin{enumerate}[i)]
      \item sublevel i
        \begin{enumerate}[a)]
           \item sublevel a
        \end{enumerate}
    \end{enumerate}
\end{enumerate}
\item Level 1 [here are the skipped item]
    \begin{enumerate}[a)]
       \item sublevel a
       \item sublevel a
    \end{enumerate}

\item Level 1
\begin{enumerate}[A)]
 \item sublevel A
    \begin{enumerate}[a)]
       \item sublevel a
       \item sublevel a
    \end{enumerate}
 \item sublevel A
    \begin{enumerate}[i)]
  \item sublevel i
        \begin{enumerate}[a)]
           \item sublevel a
        \end{enumerate}
 \item sublevel i
    \end{enumerate}
\end{enumerate}
\end{enumerate}
\end{document}

If you meant that you want each of the a) items indented to the same horizontal space, then you can use empty itemize lists which have a \phantom label so nothing gets printed. The parameter of the \phantom would need to be the largest value.

\documentclass{article}
\usepackage[shortlabels]{enumitem}

\begin{document}
\begin{enumerate}[1)]
\item Level 1
\begin{enumerate}[A)]
    \item sublevel A
    \begin{enumerate}[i)]
      \item sublevel i
        \begin{enumerate}[a)]
           \item sublevel a
        \end{enumerate}
    \end{enumerate}
\end{enumerate}
\item Level 1 [here are the skipped item]
    \begin{itemize}[\phantom{A)}]\item% This provides a phantom "A)" list
    \begin{itemize}[\phantom{i)}]\item% This provides a phantom "i)" list
    \begin{enumerate}[a)]
       \item sublevel a
       \item sublevel a
    \end{enumerate}
    \end{itemize}
    \end{itemize}
\item Level 1
\begin{enumerate}[A)]
 \item sublevel A
    \begin{itemize}[\phantom{i)}]\item
    \begin{enumerate}[a)]
       \item sublevel a
       \item sublevel a
    \end{enumerate}
    \end{itemize}
 \item sublevel A
    \begin{enumerate}[i)]
  \item sublevel i
        \begin{enumerate}[a)]
           \item sublevel a
        \end{enumerate}
 \item sublevel i
    \end{enumerate}
\end{enumerate}
\end{enumerate}
\end{document}

enter image description here

share|improve this answer
add comment

The easylist package also allows users to skip levels:

\begin{easylist}
§ First proposition.
§§§ A sub-comment to the first proposition.
\end{easylist}

See the Usage chapter in the documentation for details.

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.