Presentations and PostersFormatting theorem environment in Beamer

Beamer, Powerdot and KOMA-Script presentations, Conference posters (a0poster, baposter, tikzposter)
Post Reply
asafw
Posts: 37
Joined: Sun Jun 10, 2012 12:33 pm

Formatting theorem environment in Beamer

Post by asafw »

Hi,

I'm using Madrid theme for a Beamer presentation.
I would like to change the appearance of theorem-like boxes from the default.
I am currently using the following code that I found online, to remove the encapsulating box.
I would like to further (i) change the font size of the title of the box, and (ii) add a line frame around the content of the box. How can I do this?

Thank you very much,
Asaf

Code: Select all

\documentclass[]{beamer}
\usetheme{Madrid}

%\setbeamerfont{frametitle}{size=\tiny}
%\setbeamerfont{block title}{size=\tiny}
\setbeamerfont{block title}{size=\tiny}

\setbeamertemplate{theorem begin}{{
\inserttheoremheadfont
\inserttheoremname
\inserttheoremnumber
\ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
\inserttheorempunctuation
}}
\setbeamertemplate{theorem end}{}

\begin{document}
\begin{frame}
\begin{theorem}[blah]
  \small
  
Hello World!
\end{theorem}
\end{frame}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply