1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
<head>
<title>UK TeX FAQ -- question label toodeep</title>
</head><body>
<h3>“Too deeply nested”</h3>
<p>This error appears when you start a LaTeX list.
<p>LaTeX keeps track of the nesting of one list inside another. There
is a set of list formatting parameters built-in for application to
each of the list nesting levels; the parameters determine indentation,
item separation, and so on. The <code>list</code> environment (the
basis for list environments like <code>itemize</code> and
<code>enumerate</code>) “knows” there are only 6 of these sets.
<p>There are also different label definitions for the
<code>enumerate</code> and <code>itemize</code> environments at
their own private levels of nesting. Consider this example:
<blockquote>
<pre>
\begin{enumerate}
\item first item of first enumerate
\begin{itemize}
\item first item of first itemize
\begin{enumerate}
\item first item of second enumerate
...
\end{enumerate}
...
\end{itemize}
...
\end{enumerate}
</pre>
</blockquote><p>
In the example,
<ul>
<li> the first <code>enumerate</code> has labels as for a
first-level <code>enumerate</code>, and is indented as for a
first-level list;
<li> the first <code>itemize</code> has labels as for a first level
<code>itemize</code>, and is indented as for a second-level list;
and
<li> the second <code>enumerate</code> has labels as for a
second-level <code>enumerate</code>, and is indented as for a
third-level list.
</ul>
Now, as well as LaTeX <em>knowing</em> that there are 6 sets of
parameters for indentation, it also <em>knows</em> that there are only
4 types of labels each, for the environments <code>enumerate</code>
and <code>itemize</code> (this “knowledge” spells out a requirement
for class writers, since the class supplies the sets of parameters).
<p>From the above, we can deduce that there are several ways we can run
out of space: we can have 6 lists (of any sort) nested, and try to
start a new one; we can have 4 <code>enumerate</code> environments
somewhere among the set of nested lists, and try to add another one;
and we can have 4 <code>itemize</code> environments somewhere among
the set of nested lists, and try to add another one.
<p>What can be done about the problem? Not much, short of rewriting
LaTeX — you really need to rewrite your document in a slightly
less labyrinthine way.
<p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=toodeep">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=toodeep</a>
</body>
|