3

I want to put a picture in a beamer slide and make it use all the available height of the frame. So I tried:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\begin{document}

\begin{frame}{FRAMETITLE}
   \centering
    \includegraphics[height=\paperheight,draft]{figure}
\end{frame}

\end{document}

but this makes my figure exceed the slide:

enter image description here

I guess \paperheight includes the frame title, hence it is too large. Is there something like a \frameheight length which corresponds to the exact height available for the frame's content?

marked as duplicate by user36296 beamer May 8 '17 at 10:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

Code basically taken from https://tex.stackexchange.com/a/278434/36296 (=> Community Wiki answer)

\documentclass{beamer}
\usepackage[utf8]{inputenc}

\begin{document}

\makeatletter
\begin{frame}{Frametitle}
    \global\beamer@shrinktrue
    \gdef\beamer@shrinkframebox{
        \setbox\beamer@framebox=\vbox to\beamer@frametextheight{
            \centering
            \includegraphics[height=\beamer@frametextheight]{example-image}
        }
    }
\end{frame}
\makeatother


\end{document}

enter image description here

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