我的问题是,我有两列幻灯片,tcolorbox
每侧都包含一个图形。我尝试使用命令\onslide
显示四张图片。这是我的代码:
\documentclass{beamer}
\usepackage{beamerthemesplit}
\usepackage{tikz}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps}
\usepackage{epsfig}
\usepackage{epstopdf}
\usepackage{tcolorbox}
\graphicspath{{./figs/}}
\begin{document}
\begin{frame}[t]{Robotic Arm Applications}
% Robotic arms are typically used in industry. Their applications include:
\begin{columns}[c]
% \onslide<-2>{
\column{2.2in}
\onslide<1->\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{Robot_welding}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering In Welding
\end{tcolorbox}
\onslide<3->\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{Robot_medical}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering In Medical
\end{tcolorbox}
% }
% \onslide<-1>{
\column{2.2in}
\onslide<2->\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{Robot_handling}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering Material Handling
\end{tcolorbox}
% }
\onslide<4->\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{Robot_automotive}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering Automotive Industry
\end{tcolorbox}
\end{columns}
%------------------
\end{frame}
\end{document}
答案1
您必须用 替换\onslide
,其中\only
不覆盖未覆盖情况下的空间。此外,覆盖规范必须略作修改。
得出:
\documentclass{beamer}
\usepackage{beamerthemesplit}
\usepackage{tikz}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps}
\usepackage{epsfig}
\usepackage{epstopdf}
\usepackage{tcolorbox}
\graphicspath{{./figs/}}
\begin{document}
\begin{frame}[t]{Robotic Arm Applications}
% Robotic arms are typically used in industry. Their applications include:
\begin{columns}[c]
%
\column{2.2in}%
\only<1-2>{\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{example-image-a}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering In Welding
\end{tcolorbox}}%
%
\only<3->{\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{example-image-b}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering In Medical
\end{tcolorbox}}%
%
\column{2.2in}%
\only<2-3>{\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{example-image-c}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering Material Handling
\end{tcolorbox}}%
%
\only<4->{\begin{tcolorbox}[width=\textwidth,colback={green},title={ \includegraphics[width=\textwidth,height=0.65\textheight]{example-image-a}},colbacktitle=yellow,coltitle=blue,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt]
\centering Automotive Industry
\end{tcolorbox}}%
%
\end{columns}
%------------------
\end{frame}
\end{document}