When my ntheorem Box spans multiple pages, I want it to have a hint on each page, that it is a continuation. How can this be done?

Below is some sample code, spanning a box over two pages, which is yet missing a hint on the second page, that it is a continuation.





\textbf{Some sample text}

At the beginning of the box at page 2 it shall have\\
\textbf{Example 1 (Continued)}.\\
(Included at the top of the box, not before the box).



enter image description here


This can be easily achieved using either the mdframed or tcolorbox packages.

An option using mdframed:

\usepackage[a6paper]{geometry}% just for the example

  middleextra={\node[anchor=north west,font=\bfseries,inner xsep=0pt,xshift=10pt] at (P-|O) {Example~\thetest\ (Continued)};},
  secondextra={\node[anchor=north west,font=\bfseries,inner xsep=0pt,xshift=10pt] at (P-|O) {Example~\thetest\ (Continued)};}


\begin{test}[An example]


enter image description here

And here's now an option using tcolorbox:

\usepackage[a6paper]{geometry}% just for the example


outer arc=0pt,
title after break={Example~\thetest\ (Continued)}
before upper={
  \stepcounter{test}\textbf{Example~\thetest.\ }%




enter image description here

  • Thank you! Until now I used \definecolor{myColor}{rgb}{0.9,0.9,0.9} followed by \shadecolor{myColor} (both before newshadedtheorem) Can you please tell me, how to migrate this to your solution? Sep 11 '13 at 17:58
  • @stefan.at.wpf keep the definition of your color and change the line backgroundcolor=gray!50, to backgroundcolor=myColor,. Sep 11 '13 at 18:00
  • my fault, thanks for the hint. your example works great, but I get some problems in my real document ): will get back to this problem tomorrow. basically correct answer. Sep 11 '13 at 18:21
  • @stefan.at.wpf OK. In the meantime I updated my answer with another option, using this time the tcolorbox package. Sep 11 '13 at 20:03
  • I yet didn't have the chance to check if your new version works for me, but I selected your answer as correct one as it does exactly what I wanted anyways. Thank you very much! Sep 14 '13 at 16:06

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.