14

I have a slide with a figure in it. I want show a vertically and horizontally centered (relative to the image if possible) text box overtop of it as an overlay which will contain a few lines of text.

alt text

\documentclass{beamer}
\usepackage[T1]{fontenc}

\begin{document}

\begin{frame}
    \frametitle{ESR1} 

    \begin{center}
        Functional analysis
    \end{center}

    \begin{center}
        \includegraphics[width=1\textwidth]{some_image.jpg}
    \end{center}
\end{frame}
\end{document}
20

Basically, the same solution as in your last question works: just put the image inside a TikZ node and you can position anything on top of it wherever you want.

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{tikz}

\begin{document}

\begin{frame}
    \frametitle{\emph{Mycena interrupta}} 

    \begin{center}
        Known as the Pixies' parasol.
    \end{center}

    \begin{center}
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=1\textheight]{some_image.jpg}};
            \node[align=center,red,font={\Huge\bfseries}] at (image.center) {Do NOT eat\\these!};
        \end{tikzpicture}
    \end{center}
\end{frame}
\end{document}

example

(Actually, I have no idea whether they are dangerous; the Wikipedia article is rather short and I don't know anything about mushrooms ­­­­— this was just the first nice picture I found on Wikimedia Commons.)

Image attribution: Wikimedia Commons, JJ Harrison.

5

I use the casper image just for a trivial purpose.

alt text

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{pstricks}


\newdimen\ImageW
\ImageW=8cm

\newdimen\ImageH
\ImageH=6cm

\fboxrule=0pt
\begin{document}

\begin{frame}[t]{ESR1} 

    \begin{center}
        Functional analysis
    \end{center}

    \begin{center}
      \pspicture(\ImageW,\ImageH)
        \rput(0.5\ImageW,0.5\ImageH){\includegraphics[width=\ImageW]{CasperFunny}}
        \rput[c](0.5\ImageW,0.75\ImageH)%
        {\fbox{\parbox{6cm}{\color{red}\Huge\bf\centering la la la la la! Casper the friendly ghost}}}      
        \endpspicture
    \end{center}

\end{frame}
\end{document}

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.