The amsthm theorem environments (theorem,example,proof,solution,…) make blocks on beamer slides. The default is that example environments use a different template (block example) than theorem or solution or proof (block).
How do I make solution use a different template like "block solution" that I can define?
Edit: Thanks to those who answered. I haven't implemented a workaround yet but it seems like there are two ideas:
-
Redefine the
\th@foo
command for a theorem-like environment namedfoo
. The new command should redefine\inserttheoremblockenv
to be the desired block environment. Seebeamerbasetheorems.sty
(around line 63) for how this is done specifically forexample
. -
Redefine the
theorem begin
andtheorem end
template to look up the correct theorem block environment based on the global variable\inserttheoremname
(seebeamerinnerthemedefault.sty
). The lookup table could be kept in apgfkeys
registry. This approach would be a bit higher-level and wouldn't involve any commands with@
in them; however, YAGNI comes to mind.
Best Answer
As seen in
beamerbasetheorems.sty
:Whatever style you like. You can also change the appearance of the [alert|example]block:
(Not tried it, just looked into the beamer sources)
EDIT: Still not sure want you want to do, but you can define your own theorem styles:
(This works, I tested it)
You have 3 predefined blocks which you can customize using \defbeamertemplate. Look into the sources and the documentation on how to do this. If you need more block environments, see
basebeamerlocalstructure.sty
:Hope that helps