I'm trying to write a text box inside an exercise environment. Unfortunately, this prevents mdframed to break among pages. I want to obtain mdframed to work inside the exercise environment and get page breaks when necessary:




\begin{mdframed} % No exercise environment and the box breaks among pages

\begin{Exercise}[title= Exercise title]
\begin{mdframed} % The box does not break among pages

  • Welcome to TeX.SX! – Bobyandbob Sep 12 '18 at 10:03
  • Imho it can't work. Exercise stores the exercise in a box and unbox is later. Depending on the layout you want to achieve you could look at tcolorbox and its recording commands, see e.g. section 8.3 of its documentation. – Ulrike Fischer Sep 12 '18 at 10:24

Your Answer

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

Browse other questions tagged or ask your own question.