Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm making a poster using beamer and when I use \begin{theorem} and \begin{proof} it makes the theorems and proofs in a box just like a block title would be.

I understand this is the default setting when using beamer but I want my theorems and proofs to look like the default when just writing an article in LaTeX. Is there a way I can change the theorem style or theorem environment so that theorem and proof are no longer in boxes?

share|improve this question

migrated from stackoverflow.com Dec 30 '11 at 16:19

This question came from our site for professional and enthusiast programmers.

    
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Dec 30 '11 at 16:41

2 Answers 2

The style is defined by

  • \setbeamertemplate{theorem begin} and
  • \setbeamertemplate{theorem end}

Check page 122 of beameruserguide.pdf. In the following I have just deleted the \inserttheoremblockenv commands from the definition in the manual.

\documentclass[]{beamer}
\usetheme{boadilla}
\setbeamertemplate{theorem begin}{{
\inserttheoremheadfont
\inserttheoremname
\inserttheoremnumber
\ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
\inserttheorempunctuation
}}
\setbeamertemplate{theorem end}{}
\begin{document}
\begin{frame}
\begin{theorem}
Hello World!
\end{theorem}
\end{frame}
\end{document}
share|improve this answer
1  
For what it's worth, in order to avoid getting Theorem 1 (), I need to use \empty and not \@empty. –  hoyland Jul 20 '12 at 17:09

Here is a naive approach at defining your own mytheorem and myproof environments.

enter image description here

\documentclass{beamer}% http://ctan.org/pkg/beamer
\usetheme{Warsaw}

\newenvironment<>{mytheorem}[1][]
  {\alert{\upshape\textbf{Theorem}} #1\hspace*{\fill} \\
   \itshape}
  {}
\makeatletter
\newenvironment<>{myproof}[1][\proofname]{%
  \par
  \def\insertproofname{#1\@addpunct{.}}%
  \pushQED{\qed}
  \alert{\textbf{\insertproofname}} \hspace*{\fill} \\}
{\popQED}
\makeatother

\begin{document}
\begin{frame}
  \frametitle{This is a frame title}
  \begin{theorem}
    This is a theorem statement.
  \end{theorem}

  \begin{proof}
    This is a theorem proof.
  \end{proof}
\end{frame}

\begin{frame}
  \frametitle{This is a frame title}
  \begin{mytheorem}
    This is a theorem statement.
  \end{mytheorem}

  \begin{myproof}
    This is a theorem proof.
  \end{myproof}
\end{frame}

\end{document}

In the above example, mytheorem typesets Theorem using in boldface, upright and "alerted" font (\alert{\upshape\textbf{...}}) just to show that there is freedom in the formatting. The same goes for myproof.

It would be possible to completely duplicate the theorem environment that would allow (1) a bracketed optional argument and (2) even a theorem number, if needed. However, since this still forms part of a presentation where numbering doesn't make much sense, it's been left out. At the moment, specifying an optional parenthesized theorem addition is obtain using \begin{mytheorem}[(...)].

Defining your own, new environment for theorems and proofs allows you to switch between or back to the regular theorem and proof environments, if needed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.