I would like to penalize, but not forbid a page break in tcolorbox theorems. Is this possible? MWE:



\newtcbtheorem{TcbTheorem}{Theorem}{breakable, colback=blue!5, colframe=blue!5, coltitle=red,}{thm}

        do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 
        \begin{TcbTheorem}{Avoid Breaking This}{}
    \begin{TcbTheorem}{Break This}{}

1 Answer 1


Hope this answer is not too late.

Environments defined by \newtcbtheorem accept an optional argument as their first argument, in the form of a list of tcolorbox options. Hence you can specify option unbreakable (or breakable=false) to locally switch the break-ability.

\begin{TcbTheorem}[unbreakable]{Avoid Breaking This}{}

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.