我有以下问题:
我有一个定理,想先展示其中的一部分,而不展示定理的主体。我试过:
\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}
编辑:
改进的代码
\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}
在这个编译器中,颜色#CCCCCC 似乎并不适合。
答案1
可能有点不妥,但我们可以简单地改变标题的颜色来隐藏它:
\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}
另一种颜色主题:
\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}
题外话:你不需要,\usepackage{graphicx}
也\usepackage{xcolor}
不用使用 beamer