I would like to construct a new environment that I can call like:

\begin{Box}{*Title of Box*}

** Text **
** Math equations **


It shall have the following properties:

  • The box background shall have a colour.
  • The text inside the box shall have a distance of 3 - 5 mm to the boundary.
  • Important: It shall break at the end of a page and continue at the next page.

Is there someone who can do that?

  • 4
    Use the package tcolorbox. – Ulrike Fischer Jun 2 '16 at 11:08
  • Welcome to TeX.SE. How wide should be color box be? – Mico Jun 2 '16 at 11:37

This can be achieved with tcolorbox, one of my favourite packages (;-))



% Define a new box for this
\newtcolorbox[auto counter]{MyBox}[2][]{%
  title={MyBox \thetcbcounter\ #2},


\begin{MyBox}{My nice title box}





\begin{MyBox}[width={0.5\textwidth},coltitle={blue}, colbacktitle={gray},colback={green!60!blue}]{My nice title box, but not so wide}






enter image description here

| improve this answer | |

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.