TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've checked the post here, where the package empheq is used for embedding equations into coloured boxes.

With that idea, I wrote in my file the following:

% in the preambule

% in the body
  ...equation here...

It works nicely. However, I'd like to create a new environment for such a box... I tried something like,


but this doesn't work.


  • Can someone help me to define this environment?
  • Is it possible to define an environment which the colour is an argument? So I can use different colours.

Thank you all.

share|improve this question
up vote 9 down vote accepted

Please always make full documents when asking questions, it makes things a lot easier.

It seems that like a lot of environments that grab the environment body you need to use this form when wrapping in environment definitions (AMS display environments have the same feature):

enter image description here






% in the body
  ...equation here...

  ...equation here...

  ...equation here...

share|improve this answer
Thank you for the quick response. Next time I'll follow your advise about the whole document. Cheers. – Dox Aug 16 '12 at 13:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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