2

I am trying to solve problem with nested frame environments which must be both breakable. It is not important to use tcolorbox if there is some better alternative.

Is it possible to display it correctly? Imagine the situation below. Thanks.

\documentclass{article}

\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\begin{document}

    \begin{tcolorbox}[breakable, enhanced]
        \lipsum[1-6]

        \begin{tcolorbox}[breakable, enhanced]
            \lipsum[1-6]
        \end{tcolorbox}

    \end{tcolorbox}
\end{document}
1
  • 1
    The tcolorbox manual clearly states: Nesting of breakable box inside a breakable box is not possible! The inner breakable specification` will be ignored. Perhaps you should state what you really want to achieve
    – user31729
    Apr 21, 2016 at 15:41

1 Answer 1

4

The best without further information you can achieve is to use enforce breakable, but as the manual of tcolorbox states:

enter image description here

\documentclass{article}

\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\begin{document}

    \begin{tcolorbox}[breakable, enhanced]
        \lipsum[1-6]

        \begin{tcolorbox}[enforce breakable, enhanced]
            \lipsum[1-6]
        \end{tcolorbox}

    \end{tcolorbox}
\end{document}

The screen shot shows the broken outer tcolorbox which ends in the middle of nowhere, the remaining contents appear on the 3rd and 4th pages. (not shown here)

enter image description here

2
  • Thanks. I know about this. That's why I am asking if there is any other breakable environment which will work in tcolorbox.
    – sssss
    Apr 23, 2016 at 16:52
  • @sssss: I know of none
    – user31729
    Apr 23, 2016 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.