Math & Science ⇒ A colored box around theorems and definitions
A colored box around theorems and definitions
Hi guys,
I would like to have a colored box around theorems and definitions. How can I do that ?
Thanks in advance.
petey
I would like to have a colored box around theorems and definitions. How can I do that ?
Thanks in advance.
petey
Last edited by petey on Sat Jul 17, 2010 11:28 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
A colored box around theorems and definitions
Hi petey,
you could use \colorbox or \fcolorbox, like
Those commands are described in the documentation to the color and graphicx packages (grfguide.pdf).
Stefan
you could use \colorbox or \fcolorbox, like
Code: Select all
\fcolorbox{frame color name}{box color name}{text}
Stefan
LaTeX.org admin
Re: A colored box around theorems and definitions
Hi Stefan,
Thanks! I tried them and they work as long as I don't put a theorem inside. Strange.
petey
Thanks! I tried them and they work as long as I don't put a theorem inside. Strange.
petey
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
A colored box around theorems and definitions
You could try the framed package. It provides more features than the color package with its boxes.
Stefan
Stefan
LaTeX.org admin
Re: A colored box around theorems and definitions
Hi Stefan,
Thank you very much
! It works perfectly.
Thank you very much

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: A colored box around theorems and definitions
Now that the problem is solved, please mark the topic accordingly as described in Section 3 of the Board Rules.
Best regards
Thorsten
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: A colored box around theorems and definitions
Done.
Thanks again for all the help and a great forum.
Best regards
petey
Thanks again for all the help and a great forum.
Best regards
petey