General ⇒ Customizing theorems
Customizing theorems
I'm writing some guides for some people at the moment and was wondering if anyone knew how I could "color" in theorems, i.e. shade them with a different background color of any sort.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Customizing theorems
Hi,
some of the features provided by the ntheorem package could be useful for you. Please have a look at the package documentation (partuicularly, section 2.3.7 Framed and Boxed Theorems, pp 7ff).
some of the features provided by the ntheorem package could be useful for you. Please have a look at the package documentation (partuicularly, section 2.3.7 Framed and Boxed Theorems, pp 7ff).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Customizing theorems
Thanks, using that now.
Odd problem, though: I've used \newshadedtheorem but now it doesn't like having figures within things:
But it throws up with "Not in outer par mode".
Does anyone know how to fix this?
Odd problem, though: I've used \newshadedtheorem but now it doesn't like having figures within things:
Code: Select all
\theoremclass{Theorem}
\theoremstyle{break}
\theoremheaderfont{\normalfont\bfseries}
\theorembodyfont{\normalfont}
\theoremsymbol{\ensuremath{\diamondsuit}}
\theoremseparator{:}
\newframedtheorem{example}{Example}[section]
...
\begin{example}
\begin{figure}[h]
\begin{center}
\includegraphics{SomeImage.eps}
\caption{Blobby}
\end{center}
\end{figure}
\end{example}
Does anyone know how to fix this?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Customizing theorems
Omit the float environment and use the \captionof command provided by the caption package. The figure doesn't need to float in this case.
Best regards and welcome to the board
Thorsten¹
Best regards and welcome to the board
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