我正在做一個演示,我有很多圖表和文字。
在一個特定的框架中,我使用該\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
會得到: