Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I needed to move a picture to the right side of a slide, so I used tikzpicture! but with using the \caption, it will put the caption right in the middle of the picture.

How can I move the caption?

Here is my code:

\begin{figure}
\begin{tikzpicture}[remember picture,overlay]  
  \node [xshift=-2.8cm,yshift=-1cm] at (current page.east)
    {\includegraphics[width=0.7\textwidth]{Geant_topology.jpg}};

\end{tikzpicture}
\caption{Geant Topology}
\end{figure}
share|improve this question
4  
overlay means don't occupy any space (roughly speaking). –  percusse Nov 27 '12 at 21:03
2  
You say "slide". Are you using beamer by any chance? If so, you may as well not use figure and simply shove the picture to the side using \hfill. –  Loop Space Nov 27 '12 at 21:42
    
And do you want text to go to the left of the figure? –  Gonzalo Medina Nov 28 '12 at 0:03
    
You can include the caption as part of the tikz picture, using a node below the image. Also, as percusse warned, remember that an overlay is superimposed to any other content in the slide, so if you have some text on the left it will "overflow" on the image. Why don't use a two-column layout? –  JLDiaz Nov 28 '12 at 10:44

2 Answers 2

up vote 6 down vote accepted

You don't need Tikz for that, just use two columns.

\documentclass{beamer}
\usepackage{mwe}       % <-- For dummy images
\usepackage{blindtext} % <-- For dummy text
\begin{document}
\begin{frame}{Title}

\begin{columns}

    \begin{column}{0.5\textwidth}
        \blinditemize
    \end{column}

    \begin{column}{0.5\textwidth}
        \begin{figure}
        \includegraphics[width=0.7\textwidth]{example-image-a}
        \caption{Geant Topology}
        \end{figure}
    \end{column}

\end{columns}

\end{frame}
\end{document}

enter image description here

share|improve this answer

Since figures aren't floats in beamer, you can use them within TikZ pictures, so you can add captions and refer to them.

Change the nesting, use figure inside, and there's no problem with overlays when placing. Just remember to compile twice for placing the overlay.

\documentclass[demo]{beamer}
\usepackage{tikz}
\setbeamertemplate{caption}[numbered]
\begin{document}
\begin{frame}{Title}
  See figure \ref{demo}.
  \begin{tikzpicture}[remember picture,overlay]  
    \node [xshift=-4cm,yshift=-1cm] at (current page.east) {
      \parbox{.5\textwidth}{
        \begin{figure}
          \includegraphics{demo}
          \caption{Demonstration}
          \label{demo}
        \end{figure}
    }};
  \end{tikzpicture}
\end{frame}
\end{document}

frame with figure

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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