## LaTeX forum ⇒ Others ⇒ TikZ + Beamer: Placing text immediately under images

Information and discussion about other tools not listed above.
kaiserkarl13
Posts: 582
Joined: Tue Mar 25, 2008 5:02 pm
Location: Columbia, Missouri, USA

### TikZ + Beamer: Placing text immediately under images

There are many times when I'm making a beamer-based presentation and I want to include an image that is accompanied, right below it (either centered or left-aligned), by a caption denoting where I got the image. In in-line images, I can work around this with line breaks, but what I really want is something like this:
\begin{tikzpicture}  \node (main) at (0,0) {\includegraphics{myimage}};  \node [below of=main] {My caption};  \node (second) at (3,0.5) {\includegraphics{myotherimage}};  \node [below of=second] {My second caption};\end{tikzpicture}

This will, unfortunately, result in "captions" that overlay the pictures or are too far from them. It works perfectly if I specify [anchor=south west] for the main image and [anchor= north west] for the first caption, but if I try that for the second image, the second caption is right on top of the first one, regardless of what I specify for the second image.

What I'm really trying to do is avoid specifying "node distance=XXX" by trial-and-error or laying out each picture/caption set with exact coordinates (i.e., what I want is to move one and the other moves with it, but they're always right below the images).

Any suggestions?

Tags:

Stefan Kottwitz
Posts: 8208
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi,

did you solve this challenge in the meantime?

I think it may not be hard. It's just that there was no actual code here, to try, so it was a bit too theoretical for me to answer.

Stefan