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:
Code: Select all
\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?