4

I want to achieve that included graphics are always on the bottom of the frame, so that their position isn't influenced by the length of the text above.

I tried the figure enviroment without success and the \vfill also doesn't give the wished success.

Here is some similar example source (and you can download the images here I'm using the same):

\documentclass{beamer}

\usepackage{xspace}

\begin{document}

\frame{

    \only<1-3>{Blablabla1}
    \only<4>{Blablabla2}
    \only<5>{Blablabla3}
    \only<6>{Blablabla4}
    \only<7>{Blablabla5}
    \only<8>{Blablabla6}
    \only<9>{Blablabla7}

    \vfill

    \visible<3->{%
        \includegraphics<1-3>[width=\linewidth]{img/1.png}
        \includegraphics<4>[width=\linewidth]{img/2.png}
        \includegraphics<5>[width=\linewidth]{img/3.png}
        \includegraphics<6>[width=\linewidth]{img/4.png}
        \includegraphics<7>[width=\linewidth]{img/5.png}
        \includegraphics<8>[width=\linewidth]{img/6.png}
        \includegraphics<9>[width=\linewidth]{img/7.png}
        \includegraphics<10>[width=\linewidth]{img/8.png}
    }

}

\end{document}

alexurba gave me the answer.

I have to add the [b] option to the frame enviroment. Thank you very much for that.

4
  • Welcome to TeX.SX! Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem.
    – jub0bs
    Aug 24 '13 at 17:02
  • @Jubobs thanks for the advice. I made the source compilable and added a link to the pictures im using so people can download them. Aug 24 '13 at 19:11
  • First, the code is still not compilable; there is no \begin{document} for starters (and obviously the images will be missing). Apart from that, I think you are looking for \frame[b]{...}, which will vertically align the frame content at the bottom. I personally use the frame environment: \begin{frame}[b] ... \end{frame}. Finally, the graphicx package is already loaded by beamer, so no need for \usepackage{graphicx}.
    – alexurba
    Aug 24 '13 at 20:45
  • @alexurba Ah, sorry for the inconveniences with the compiling. I added the \begin{document} in my editor but forgot to copy that version. And thank you, the [b] option was exaclty what I was looking for. Could you make an answer so I can mark it as correct? Aug 26 '13 at 9:05
2

The \frame command takes the vertical alignment as an optional argument. \frame[b]{...} will align the frame contents at the bottom, which is what the OP was looking for (use c for centered and t for top).

The frame environment supports the same arguments (\begin{frame}[b] ... \end{frame}).

Adding the alignment option to the sample document of the original question results in:

\documentclass{beamer}
\begin{document}

\frame[b]{
    \only<1-3>{Blablabla1}
    \only<4>{Blablabla2}
    \only<5>{Blablabla3}
    \only<6>{Blablabla4}
    \only<7>{Blablabla5}
    \only<8>{Blablabla6}
    \only<9>{Blablabla7}

    \vfill

    \visible<3->{%
        \includegraphics<1-3>[width=\linewidth]{img/1.png}
        \includegraphics<4>[width=\linewidth]{img/2.png}
        \includegraphics<5>[width=\linewidth]{img/3.png}
        \includegraphics<6>[width=\linewidth]{img/4.png}
        \includegraphics<7>[width=\linewidth]{img/5.png}
        \includegraphics<8>[width=\linewidth]{img/6.png}
        \includegraphics<9>[width=\linewidth]{img/7.png}
        \includegraphics<10>[width=\linewidth]{img/8.png}
    }
}

\end{document}

enter image description here

0

The beamer slides effectively contain a \vfill at the top and/or bottom of the frame, depending on your vertical alignment. I don't think there is one that does not have any. Hence, in top alignment, your contents are vertically centered below the text at the top.

The solution is simple: use a stronger fill instead of \vfill:

\vskip 0pt plus 1filll

Yes, that is three l. If you want, you can do a

\ProvideCommand{\vfilll}{\vskip 0pt plus 1filll minus 0pt}

and then just use \vfilll as a stronger fill.

Alternatively, you can cancel out the vfill by placing this at the end of your frame (assuming top alignment):

\vskip 0pt plus -1fill% Bottom align

This time with two l, because beamer added 1fill for top alignment. For center alignment, use -1.5fill (see beamerbaseframe.sty).

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.