Before I get to many of "don't do this as it does not look good", I have two modes of my documents:
- Final mode: where there is ONLY one level of nested
mdframed
- Review mode: where there are numerous levels of nested
mdframed
, each one indicating information needed during the review process relevant to the text within themdframed
.
So, this requested usage is ONLY for my review mode.
The code below produces
But, Un-commenting out the two lines in the code yields
LaTeX Error: Too deeply nested.
I would like to get a larger number of nesting?
Code:
\documentclass{article}
\usepackage{xcolor}
\usepackage{mdframed}
\begin{document}
\begin{mdframed}[frametitle={Outer Title 1},backgroundcolor=orange!25]
\begin{mdframed}[frametitle={Inner Title 2},backgroundcolor=cyan!25]
\begin{mdframed}[frametitle={Inner Title 3},backgroundcolor=yellow!25]
%\begin{mdframed}[frametitle={Inner Title 4},backgroundcolor=green]
%\end{mdframed}
\end{mdframed}
\end{mdframed}
\end{mdframed}
\end{document}
enumitem
would do it, but there's also a way to do it without loading a heavy package. – Paul Gessler Feb 27 '14 at 3:20enumitem
in my actual use case, that means that this is NOT going to solve my real problem... – Peter Grill Feb 27 '14 at 3:22\@toodeep
made byenumitem
:\def\@toodeep{% \ifnum\@listdepth>\enit@listdepth\relax \enit@toodeep \else \count@\@listdepth \global\advance\@listdepth\@ne \@ifundefined{@list\romannumeral\the\@listdepth}% {\expandafter\let \csname @list\romannumeral\the\@listdepth\expandafter\endcsname \csname @list\romannumeral\the\count@\endcsname}{}% \fi}
This doesn't affect standard lists, but any non-standard environment (mdframed
, in particular) controlling the nesting levels with\@toodeep
will now allow... – Gonzalo Medina Feb 27 '14 at 4:54