1
\begin{frame}{Convex polygon \& concave polygon}
    \begin{definition}
        A \textbf{convex} polygon has all its diagonals inside the polygon. \\
        A \textbf{concave} polygon has at least one diagonal outside the polygon.
    \end{definition}
        \only<2>{ \includegraphics[width=\textwidth]{concave_convex.pdf} }
        \only<3>{ \includegraphics[width=\textwidth]{concave_convex_ans.pdf} }
\end{frame}

At the moment, the 1st slide does not take account into the space occupied by the graph, as shown below: enter image description here enter image description here enter image description here

How can I make sure that the first slide takes account into the graph, so that the definition is NOT vertically centered.

Thanks.

2

Edit: it seems that the simplest solution is add option [t] to the frame:

    \documentclass{beamer}

    \begin{document}
\begin{frame}[t]{Convex polygon \& concave polygon}
    \begin{definition}
        A \textbf{convex} polygon has all its diagonals inside the polygon. \\
        A \textbf{concave} polygon has at least one diagonal outside the polygon.
    \end{definition}
    \bigskip 
    \centering  
        \only<2>{\includegraphics[width=0.5\textwidth]{example-image-a}}
        \only<3>{\includegraphics[width=0.7\textwidth]{example-image-b}}   

\end{frame}
    \end{document}

enter image description here

  • It occupies both space of the two graphs instead of just the first one. – Chen Stats Yu Dec 20 '15 at 22:19
  • You can first split the graphics area with \minipage. – diadochos Apr 24 at 2:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.