1

When you use a two-column document does the number of nested list environments you can place gets reduced? I thought that you could use 6 nested environments before LaTeX "complain" about being too deeply nested, but now LaTeX "complain" when I try to use the 5th nested environment.

4
  • 1
    There is a limit on nesting list based environments (six); at most four of them can be enumerate or itemize. Are you really sure you want to nest so many lists in a two column document? The line width of the deepest one will be very narrow.
    – egreg
    May 24, 2016 at 21:25
  • @egreg I use 3 but I tried it out of curiosity and I got that warning.
    – Adam
    May 24, 2016 at 21:30
  • Can you show an example?
    – egreg
    May 24, 2016 at 21:31
  • @egreg An example of what? I used out of curiosity 4 enumerate environments and got that warning...You said that 4 was the limit so you basically answered. :P
    – Adam
    May 24, 2016 at 21:34

1 Answer 1

1

There is a limit of nesting six list based environments (including, for instance, quotation, quote, description, enumerate and itemize).

However at most four of them can be enumerate or itemize.

The following example fails because there are five nested enumerate environments:

\documentclass{article}
\begin{document}
\begin{quotation}
Level 1
\begin{enumerate}
\item Level 2
\begin{enumerate}
\item Level 3
\begin{enumerate}
\item Level 4
\begin{enumerate}
\item Level 5
\begin{enumerate}
\item Level 6
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{quotation}
\end{document}

However, if the deepest enumerate is changed into itemize, no error shows up. The twocolumn option is irrelevant for the task.

If another level is added, quote in the example, the error shows up again.

\documentclass{article}
\begin{document}
\begin{quotation}
Level 1
\begin{enumerate}
\item Level 2
\begin{enumerate}
\item Level 3
\begin{enumerate}
\item Level 4
\begin{enumerate}
\item Level 5
\begin{itemize}
\item Level 6
\begin{quote}
Level 7
\end{quote}
\end{itemize}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{quotation}
\end{document}

This stops with

! LaTeX Error: Too deeply nested.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.15 \begin{quote}

Non list based environments don't have such a limitation, but only the general TeX limit on semantic nest size (default 500 in TeX Live), that is, the number of open groups.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .