我正在做一个演示文稿,有很多图表和文字。
在一个特定的框架中,我使用命令\only
来分离图形和文本。以下是代码:
\documentclass{beamer}
\usetheme{Madrid}
\usecolortheme{seagull}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{fancybox}
\setbeamertemplate{footline}{}
\beamertemplatenavigationsymbolsempty
\begin{document}
\begin{frame}
\frametitle{Método B}
\begin{figure}[h]
\only<1>{\centering{\Ovalbox{\resizebox{0.8\paperwidth}{!}{\input{1b}}}}}
\only<2>{\centering{\Ovalbox{\resizebox{0.8\paperwidth}{!}{\input{2b}}}}}
\end{figure}
\only<3>{
\shadowbox{
\begin{minipage}[c]{0.9\paperwidth}
Temos que
\[ \frac{\delta}{\lambda}=\frac{\phi\lambda}{2\pi\lambda}=B\cdot l\cdot E^2=B\cdot l\cdot\frac{V^2}{d^2} \]
logo
\[ \phi(V^2) = \frac{2\pi Bl}{d^2}\cdot V^2\]
O coeficiente angular da reta que melhor se ajustou aos dados é $5.66\cdot 10^{-6}$ V$^{-2}$. As dimensões $l$ e $d$ da célula Kerr são
$l=20.08$ mm e $d\approx 1$ mm. Com isso temos que
\[ B = \frac{d^2}{2\pi l}\cdot 5.66\cdot 10^{-6} = 55\]
\end{minipage}
}
}
\end{frame}
\end{document}
我希望带有零件的盒子\only<3>
位于框架的中心,但我得到的结果如下:
从视觉上看,该\only<3>
部分没有居中(看看盒子的位置:它在底部)。我已经尝试了很多中心环境的组合,但都没有任何区别……
答案1
基本上你不需要figure
Beamer 中的环境:
\documentclass[demo]{beamer}
\usetheme{Madrid}
\usecolortheme{seagull}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{fancybox}
\setbeamertemplate{footline}{}
\beamertemplatenavigationsymbolsempty
\begin{document}
\begin{frame}
\frametitle{Método B}
% \begin{figure}[h] %commented here
\only<1>{\centering\Ovalbox{\resizebox{0.8\paperwidth}{!}{\includegraphics{1b}}}}
\only<2>{\centering\Ovalbox{\resizebox{0.8\paperwidth}{!}{\includegraphics{2b}}}}
% \end{figure} %commented here
\only<3>{
\shadowbox{
\begin{minipage}{0.9\paperwidth}
Temos que
\[ \frac{\delta}{\lambda}=\frac{\phi\lambda}{2\pi\lambda}=B\cdot l\cdot E^2=B\cdot l\cdot\frac{V^2}{d^2} \]
logo
\[ \phi(V^2) = \frac{2\pi Bl}{d^2}\cdot V^2\]
O coeficiente angular da reta que melhor se ajustou aos dados é $5.66\cdot 10^{-6}$ V$^{-2}$. As dimensões $l$ e $d$ da célula Kerr são
$l=20.08$ mm e $d\approx 1$ mm. Com isso temos que
\[ B = \frac{d^2}{2\pi l}\cdot 5.66\cdot 10^{-6} = 55\]
\end{minipage}
}
}
\end{frame}
\end{document}
由此产生了如下结果:
现在,如果你想要在标题和框之间留出更多空间,只需skip
在里面添加一些即可\only<3>
。使用\bigskip
你将获得: