26

I have an image, I want to write its source in a very small font size on the last possible line of the slide, ignoring the available space after image

\section{SCS}
\subsection{SCS}
\begin{frame}
  \frametitle{Simple Client-Server}
  \begin{center}
    \includegraphics[scale=0.3]{scs}
  \end{center}
  source of image :write this text at the bottom of the slide (not footnote)
\end{frame}
Werner
  • 603,163
epsilon8
  • 5,961

2 Answers2

41

The following solution works works without employing a minipage:

\documentclass{beamer}% http://ctan.org/pkg/beamer

\newcommand{\btVFill}{\vskip0pt plus 1filll}

\begin{document}
\section{SCS}
\subsection{SCS}
\begin{frame}
  \frametitle{Simple Client-Server}
  \bigskip
  \rule{150pt}{100pt}%\includegraphics[scale=0.3]{scs}
  \btVFill

  source of image :write this text at the bottom of the slide (not footnote)
\end{frame}
\end{document}

enter image description here

You can also equally distribute the available space by employing the \btVFill command multiple times; the bottom line can be lifted a bit by adding some vertical space (such as \smallskip) after it:

\documentclass{beamer}% http://ctan.org/pkg/beamer

\newcommand{\btVFill}{\vskip0pt plus 1filll}

\begin{document}
\section{SCS}
\subsection{SCS}
\begin{frame}
  \frametitle{Simple Client-Server}
  \bigskip
  \rule{150pt}{100pt}%\includegraphics[scale=0.3]{scs}
  \btVFill
  a comment in the middle
  \btVFill

  source of image :write this text at the bottom of the slide (not footnote)
  \smallskip
\end{frame}
\end{document}

enter image description here

Daniel
  • 37,517
  • Can you explain the btVFill command? – Dr. Manuel Kuehner Oct 04 '13 at 13:14
  • 5
    @ManuelKuehner: \vskip0pt plus 1filll is TeX syntax to insert a stretchable vertical skip with a minimum of 0pt, but stretchable to "infinite value". So TeX will stretch the vertical skip as much as possible (depending on the following content), which here gives the intended result to skip to the bottom of the slide. The details of stretchable skips are pretty well explained in this answer from JLDiaz. – Daniel Oct 06 '13 at 21:43
  • 1
    This works great to produce a footer text! However, it appears first when all \pause statements in the frame have been processed, so only at the last slide of the frame. How do I make this text visible on all slides of the frame? – StrawberryFieldsForever Oct 22 '17 at 21:02
  • @StrawberryFieldsForever This is difficult using just \pause. In that case you should use \onslide<1->{bottom text} and replace all \pause commands with the correct \onslide commands. – hife Mar 08 '22 at 10:01
16

This is a common problem in beamer, with the typical solution being given by a fixed-height minipage:

enter image description here

\documentclass{beamer}% http://ctan.org/pkg/beamer
\begin{document}
\section{SCS}
\subsection{SCS}
\begin{frame}
  \frametitle{Simple Client-Server}
  \begin{minipage}[t][.8\textheight]{\textwidth}
    \begin{center}
      \rule{150pt}{100pt}%\includegraphics[scale=0.3]{scs}
    \end{center}
\vfill

source of image :write this text at the bottom of the slide (not footnote)

\end{minipage} \end{frame} \end{document}

In the above MWE, the frame body is set in a box (or minipage) of (seemingly arbitrary) height equivalent to .8\textheight. This fixed height allows the use of \vfill to push content to the bottom.

Werner
  • 603,163