I am making a presentation using beamer
, and I want to be able to position a certain image the way I want in a frame. I am not sure how to do that.
Is there some way you can specify coordinates in the frame and then set an image there?
Is there a better way to place images in various places with the beamer
class?
Best Answer
When I used such an application, I used either TikZ (my favorite), or, before knowing of TikZ, I used the textpos package.
I will briefly discuss both solutions.
TikZ
I suggest to use a TikZ
\node
withoverlay
option.NOTE: there are two ways to use TikZ here: one with RELATIVE positioning (the approach discussed below) and one with ABSOLUTE positioning (please refer to the TikZ manual for such a task).
The
overlay
means that it has no bounding box, i.e. it won't affect the existing layout. I wrote a short-cut macro around to simplify the generation of such a node. To use it, place the following code into you beamer document:So, the basic idea is a
\node[overlay]
which aligns well within the usual text (thebaseline
option). You will need to use theat (<x>,<y>)
positioning to actually place it. The placement will be relative to the embedding text. Keep in mind that you may hide text with this thing (which is the purpose of theevery overlay node
style as you guessed correctly). Note that text later in the document is always typeset after earlier text passages. In other words: make sure the\tikzoverlay
command comes after things you want to hide.An example could be
You can safely combine this with beamer's
\only<2>
methods.textpos
The second promised approach uses the
textpos
package. Since I think that this approach is weaker and less configurable than the one above, I simply copy-paste from my personal notes:According to my old notes, the general usage is:
Example with the package configuration above: