Let's assume that I have defined very carefully the parameters of the highlight math style from the tcolorbox package.

I would like to define an environment

    \tcbhighmath{% opening tcbhighmath
    }% closing tcbhighmath

so that the result of using the environment would be:

\tcbhighmath{%the environment contents%}

The current version is obviously not working. I tried to replace the braces with \bgroup \egroup but it does not seem to work either. How to do it?


The environ package seems to be made for this.



enter image description here

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.