我正在尝试在投影仪中制作如下幻灯片:
% !TeX TS-program = xelatex
\documentclass{beamer}
\usecolortheme[rgb={0.7,0.2,0.2}]{structure}
\beamertemplateshadingbackground{red!70}{yellow!85}
\mode<article>{
\usepackage{fullpage}
\usepackage[bookmarks=false]{hyperref}
}
\mode<presentation>{
%\setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10]
\usetheme{Darmstadt}
}
\newtheorem*{remark6}{\footnotesize Prediction, The Main Purpose of Spatial Analysis}
\title[\textcolor{yellow}{Analysis of Non-Gaussian Spatial Models with Covariates Measurement Error}]
{\Large Analysis of Non-Gaussian Spatial Models with Covariates Measurement Error}
\date[{Ph.D. Thesis in Statistics} \hspace{5.3cm}December 4, 2018]{}%\\% \tiny November 2011
\begin{document}
\begin{frame}
\frametitle{\initfamily Prediction}
\begin{remark6}
\begin{columns}
\begin{column}{0.39\textwidth}
\vspace{-0.2cm}
\begin{alertblock}{}
\begin{figure}
\center\vspace{-0.1cm}
\includegraphics<1>[width=\textwidth, height=0.75\textwidth]{F13.png}
\includegraphics<2>[width=\textwidth, height=0.75\textwidth]{F14copy.png}
\includegraphics<3>[width=\textwidth, height=0.75\textwidth]{F13.png}
\includegraphics<4>[width=\textwidth, height=0.75\textwidth]{F14copy.png}
\end{figure}
\end{alertblock}
\end{column}
\begin{column}{0.49\textwidth}
\pause
\begin{block}{\center\scriptsize Bayesian Inference}
\center\scriptsize
Data Agumentation Method
\end{block}
\pause
\begin{exampleblock}{\center\scriptsize Gibbs Sampling}
\center\scriptsize Metropolis - Hatings Algorithm
\end{exampleblock}
\pause
\begin{alertblock}{\center\scriptsize Bayesian Predictive Distribution}
\center\scriptsize Bayesian Spatial Prediction
\end{alertblock}
\end{column}
\end{columns}
\end{remark6}
\end{frame}
\end{document}
但图形框的尺寸不同,如下:
和
我该如何修复它?
答案1
主要问题是图片后面的行尾未受保护。要解决这个问题,您必须%
在每个图片后面添加一个(有关更多信息,请参阅行尾的百分号 (%) 有什么用?(为什么我的宏会产生额外的空间?))
我建议使用\centering
而不是\center
。事实上,你在图中根本不需要它,因为
在 Beamer 中,图形默认居中
您的图片跨越了整个文本宽度,因此居中没有区别
更进一步:你实际上不需要环境,figure
因为你没有标题。这将节省你手动处理垂直空间的时间。
的定义remark6
看起来有点可疑,为什么不简单地使用block
?
\documentclass{beamer}
\usecolortheme[rgb={0.7,0.2,0.2}]{structure}
\beamertemplateshadingbackground{red!70}{yellow!85}
\mode<presentation>{
\usetheme{Darmstadt}
}
\begin{document}
\begin{frame}
\frametitle{Frame Title}
\begin{block}{\footnotesize Block Title}
\begin{columns}[T]
\begin{column}{0.39\textwidth}
\begin{alertblock}{}
\includegraphics<1>[width=\textwidth, height=0.75\textwidth]{example-image}%
\includegraphics<2>[width=\textwidth, height=0.75\textwidth]{example-image}%
\includegraphics<3>[width=\textwidth, height=0.75\textwidth]{example-image}%
\includegraphics<4>[width=\textwidth, height=0.75\textwidth]{example-image}%
\end{alertblock}
\end{column}
\begin{column}{0.45\textwidth}
\pause
\scriptsize
\setbeamerfont{block body}{series=\centering}
\setbeamerfont{block body example}{series=\centering}
\setbeamerfont{block body alerted}{series=\centering}
\begin{block}{Block Title}
Text
\end{block}
\pause
\begin{exampleblock}{Block Title}
Text
\end{exampleblock}
\pause
\begin{alertblock}{Block Title}
Text
\end{alertblock}
\end{column}
\end{columns}
\end{block}
\end{frame}
\end{document}