4

I have the following problem:

I have a theorem and want to show only one part of it first, without showing the head of the theorem. I tried:

\documentclass[11pt]{beamer}
\usetheme{Malmoe}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\begin{document}


\begin{frame}{A title}
\onslide<1->{Motivational text.}
\visible<3->{
\begin{theorem}
We have that
\begin{align*}
\visible<2->{\sqrt{\pi}} = \int_{-\infty}^\infty e^{-x^2} \text{d} x
\end{align*}
\end{theorem}}
\end{frame}

\end{document}

what I get: enter image description here

what I want: enter image description here

EDIT:

the improved code

\documentclass[11pt]{beamer}
\usetheme{Malmoe}
\usecolortheme{seagull}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{xcolor}

\begin{document}


\definecolor{seagullgray}{HTML}{CCCCCC}

\begin{frame}{A title}
\onslide<1->{Motivational text.}
\only<1-2>{\setbeamercolor{block title}{fg=seagullgray}}
\begin{theorem}
\visible<3->{We have that}
\begin{align*}
\visible<2->{\sqrt{\pi}} \visible<3->{= \int_{-\infty}^\infty e^{-x^2}\text{d} x}
\end{align*}
\end{theorem}
\end{frame}

\end{document}

yields enter image description here

In this compiler the color #CCCCCC doesnt even seem to fit.

5

Maybe a bit hacky but one could simply change the colour of the title to hide it:

\documentclass[11pt]{beamer}
\usetheme{Malmoe}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{graphicx}

\begin{document}


\begin{frame}{A title}
\onslide<1->{Motivational text.}
\only<1-2>{\setbeamercolor{block title}{fg=bg}}
\begin{theorem}
\visible<3->{We have that}
\begin{align*}
\visible<2->{\sqrt{\pi}} \visible<3->{= \int_{-\infty}^\infty e^{-x^2} \text{d} x}
\end{align*}
\end{theorem}
\end{frame}

\end{document}

enter image description here

With another colour theme:

\documentclass[11pt]{beamer}
\usetheme{Malmoe}
\usecolortheme{seagull}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{graphicx}
%\usepackage{xcolor}

\begin{document}


\begin{frame}{A title}
\onslide<1->{Motivational text.}
\only<1-2>{%
    \setbeamercolor{block title}{fg=bg,bg=bg}
    \setbeamercolor{block body}{bg=bg}
}
\begin{theorem}
\visible<3->{We have that}
\begin{align*}
\visible<2->{\sqrt{\pi}} \visible<3->{= \int_{-\infty}^\infty e^{-x^2}\text{d} x}
\end{align*}
\end{theorem}
\end{frame}

\end{document}

enter image description here

Off-topic: You don't need \usepackage{graphicx} nor \usepackage{xcolor} with beamer

|improve this answer|||||
  • Wow! I have not such good imagination and was developing a tikz overlay solution. (+1) – koleygr Sep 8 '18 at 14:33
  • This is a good idea. But unfortunately I use the colortheme seagull. There the Theorem environment has a gray background. I adapted your answer to this insofar that I set the block title color to #CCCCCC. (+1). But the background stays gray of course. – Falrach Sep 8 '18 at 14:36
  • 1
    @Falrach If you could make a MWE that demonstrated the problem, I'm sure it can be fixed. – samcarter_is_at_topanswers.xyz Sep 8 '18 at 14:58
  • @koleygr Thanks for the vote. Using tikz overlay is actually also a very good idea. If you already have something it might be interesting to post it as an answer - I would surely upvote it! – samcarter_is_at_topanswers.xyz Sep 8 '18 at 15:04
  • @samcarter I have edited my answer and added the adapted code. – Falrach Sep 8 '18 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.