You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know of any workarounds other than lowering the number of nesting levels in my documents. I would love it if Sphinx could switch to using enumitem to get rid of this limit.
From Nicolas M. Thiéry on 2013-08-29 15:12:46+00:00
+1 to using enumitem as well. We stumbled on this problem in Sage [1]:
Probably a bit more work will actually be needed, for there seems to be a bug in the @listdepth incrementation/decrementation with Sphinx+enumitem: for a file which is not soo deeply nested (10 maybe?) but quite long, we actually need to use \setlistdepth{264} !
From Nicolas M. Thiéry on 2014-06-13 08:36:59+00:00
I got annoyed because we now need to use \setlistdepth{2000}, so the problem was just going to become worst and worst with time. So I investigated a bit further, and found out that if we replace list by trivlist in the customized Verbatim defined by sphinx.sty, then our documenation compiles smoothly, without even using enumitem.
To everyone here: does this fix your own compilation errors?
To the sphinx devs: does this seem like a sensible change to do to sphinx.sty?
Resurrecting the discussion. Using trivlist sounds ok to me. Looking at the doc that would also means that some of the lengths are set to 0 automatically so a few (but not all) \setlength statements could be removed.
yes using trivlist is definitely feasible, avoids the check for nesting depth done by list and if needed (I have not looked closerly) we can always add some of the things done by list and not by trivlist either at begin or end. I can work on this tomorrow.
got hit by this issue while building sqlalchemy PDF doc. The following worked for me:
\usepackage{enumitem}
\setlistdepth{20}
\renewlist{itemize}{itemize}{20}
% initially, use dots for all levels\setlist[itemize]{label=$\cdot$}
\setlist[itemize]{labelsep=.5em}
% customize the first 3 levels\setlist[itemize,1]{label=\textbullet}
\setlist[itemize,2]{label=--}
\setlist[itemize,3]{label=*}
Thanks for the tip. Loading enumitem and using \setlistdepth allows to ease up the cap on maximal depths, but one must also, as you do in your code, \renewlist explicitely the itemize, enumerate and description to reset the cap on listdepth for them.
I wanted to test this and I have an issue, I can't get it to work:
\documentclass{article}
\usepackage{enumitem}
\setlistdepth{10}
\renewlist{itemize}{itemize}{10}
\setlist[itemize]{label=$\cdot$}
\setlist[itemize]{labelsep=.5em}
\setlist[itemize,1]{label=\textbullet}
\setlist[itemize,2]{label=--}
\setlist[itemize,3]{label=*}
\setlist[itemize,4]{label=*}
\begin{document}
%does NOT work! Package enumitem Error: Undefined label. (at level of \item e)\begin{itemize}
\item a
\begin{itemize}
\item b
\begin{itemize}
\item c
\begin{itemize}
\item d
\begin{itemize}
\item e
\begin{itemize}
\item f
\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}
\end{document}
Does your document really have 5 or more nested itemize ? or is it simply the maximal nesting depth which goes beyond 6 and is fixed by your set-up ?
This is with enumitem 2011/09/28 v3.5.2. Could you also check in your latex log the version you use (in case my code snippet above does work with your version of enumitem).
I see your code snippet also here. However notice that the accepted answer explicitely sets the label at each level (in the case of enumerate). I checked the enumitem manual and the fact that my code snippet is not working does seem to contradict the manual. This is possibly a bug in package enumitem, or in its documentation. This problem complicates incorporating use of enumitem into Sphinx (additionally to the fact that we should not break people's setup which already use it). Besides enumitem has had some updates after TL2009 which Sphinx currently supports. It appears some of these updates precisely refers to issues with \setlist.
It appears that the second use of \setlist upsets the first one. I have no idea if this is clear from the enumitem doc. But this does complicate matters for incorporating use of enumuitem in Sphinx.
PR #3096 addresses this without resorting to package enumitem. Of course enumitem has much to recommend it, but its version in TeXLive 2009 which Sphinx supports was at 2.x, and later it reached 3.5.2, with some important changes. Once Sphinx will support only TeXLive 2013 or later, we can more easily consider using enumitem which had no changes since.
Activity
shimizukawa commentedon Jan 2, 2015
From Anonymous on 2011-12-29 08:26:07+00:00
You will find really 100s of exercises available that will help you gain muscles and this can be done by doing bench presses, dead lifts or by utilizing hand weights. These workouts are the very best if this involves firming and strengthening the muscles.
nfl shop http://www.nfl-shops.com/
Cheap NFL Jerseys http://www.nfl-shops.com/
NFL Jerseys http://www.nfl-shops.com/
nfl shop jerseys http://www.nfl-shops.com/
http://www.nfl-shops.com/san-francisco-49ers-jerseys-c-76.html
shimizukawa commentedon Jan 2, 2015
From kaiwa on 2012-07-18 12:31:15+00:00
+1 for using enumitem package
shimizukawa commentedon Jan 2, 2015
From Martin Ortbauer on 2012-09-05 12:36:10+00:00
I encountered the same problem. did you or somebody already implement that? or did you find some workaround?
thanks
shimizukawa commentedon Jan 2, 2015
From tonycpsu on 2012-09-05 14:49:20+00:00
I don't know of any workarounds other than lowering the number of nesting levels in my documents. I would love it if Sphinx could switch to using enumitem to get rid of this limit.
shimizukawa commentedon Jan 2, 2015
From Nicolas M. Thiéry on 2013-08-29 15:12:46+00:00
+1 to using enumitem as well. We stumbled on this problem in Sage [1]:
Probably a bit more work will actually be needed, for there seems to be a bug in the @listdepth incrementation/decrementation with Sphinx+enumitem: for a file which is not soo deeply nested (10 maybe?) but quite long, we actually need to use \setlistdepth{264} !
Cheers,
Nicolas
[1] http://trac.sagemath.org/ticket/9107#comment:42
shimizukawa commentedon Jan 2, 2015
From Nicolas M. Thiéry on 2014-06-13 08:36:59+00:00
I got annoyed because we now need to use
\setlistdepth{2000}, so the problem was just going to become worst and worst with time. So I investigated a bit further, and found out that if we replacelistbytrivlistin the customized Verbatim defined bysphinx.sty, then our documenation compiles smoothly, without even using enumitem.To everyone here: does this fix your own compilation errors?
To the sphinx devs: does this seem like a sensible change to do to sphinx.sty?
shimizukawa commentedon Jan 2, 2015
From Nicolas M. Thiéry on 2014-06-13 09:16:52+00:00
I proposed a pull request for this on: https://bitbucket.org/birkenfeld/sphinx/pull-request/250/
nthiery commentedon Mar 8, 2015
Ping? Does using trivlist sound reasonable?
Revert docs LaTeX preamble and max list depth
kiwifb commentedon Jun 5, 2016
Resurrecting the discussion. Using
trivlistsounds ok to me. Looking at the doc that would also means that some of the lengths are set to 0 automatically so a few (but not all)\setlengthstatements could be removed.jfbu commentedon Jun 5, 2016
yes using
trivlistis definitely feasible, avoids the check for nesting depth done bylistand if needed (I have not looked closerly) we can always add some of the things done bylistand not bytrivlisteither at begin or end. I can work on this tomorrow.47 remaining items
mindw commentedon Oct 24, 2016
got hit by this issue while building sqlalchemy PDF doc. The following worked for me:
Fix sphinx-doc#777 (part II): Latex output "too deeply nested"
jfbu commentedon Oct 25, 2016
@mindw
Thanks for the tip. Loading
enumitemand using\setlistdepthallows to ease up the cap on maximal depths, but one must also, as you do in your code,\renewlistexplicitely theitemize,enumerateanddescriptionto reset the cap on listdepth for them.I wanted to test this and I have an issue, I can't get it to work:
Does your document really have 5 or more nested
itemize? or is it simply the maximal nesting depth which goes beyond6and is fixed by your set-up ?This is with
enumitem 2011/09/28 v3.5.2. Could you also check in your latex log the version you use (in case my code snippet above does work with your version ofenumitem).jfbu commentedon Oct 25, 2016
@mindw
I see your code snippet also here. However notice that the accepted answer explicitely sets the label at each level (in the case of enumerate). I checked the enumitem manual and the fact that my code snippet is not working does seem to contradict the manual. This is possibly a bug in package
enumitem, or in its documentation. This problem complicates incorporating use ofenumiteminto Sphinx (additionally to the fact that we should not break people's setup which already use it). Besidesenumitemhas had some updates after TL2009 which Sphinx currently supports. It appears some of these updates precisely refers to issues with\setlist.Memo:
jfbu commentedon Oct 25, 2016
@mindw
I got it just before posting a bug report to enumitem's author !
Your code should be with
and not with
It appears that the second use of
\setlistupsets the first one. I have no idea if this is clear from theenumitemdoc. But this does complicate matters for incorporating use of enumuitem in Sphinx.Fix sphinx-doc#777: (part II) LaTeX output "too deeply nested"
jfbu commentedon Oct 25, 2016
PR #3096 addresses this without resorting to package
enumitem. Of courseenumitemhas much to recommend it, but its version in TeXLive 2009 which Sphinx supports was at 2.x, and later it reached 3.5.2, with some important changes. Once Sphinx will support only TeXLive 2013 or later, we can more easily consider usingenumitemwhich had no changes since.Fix sphinx-doc#777: (part II) LaTeX output "too deeply nested"
Merge pull request #3096 from jfbu/latex_fixtoodeeplynested