0

I am trying to produce a slide in beamer as:

% !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}

But the figure boxes are in different sizes as:

enter image description here

and

enter image description here

How can I fix it?

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
Vahid
  • 109

1 Answers1

3

The main problem is that you have unprotected line endings after your images. To fix this you have to add a % after each of them (for more information, see What is the use of percent signs (%) at the end of lines? (Why is my macro creating extra space?) )


I suggest to use \centering instead of \center. In fact you anyway don't need it in the figure because

  1. figures are centred by default in beamer

  2. your image spans the complete textwidth, so centering makes no difference

One step further: you actually don't need the figure environment as you don't have a caption. This will save you from manually messing with the vertical spaces.


The definition of remark6 looks more than a bit fishy, why not simply using a 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}

enter image description here