15

Possible Duplicates:
Drawing on an image with TikZ
How to superimpose LaTeX on a picture?

I was wondering if it's possible to have an existing image (possibly in a figure environment) and then add text at arbitrary locations within that image/figure. Does maybe Tikz allow something like that?

For clarity: This wiki link has this synapse image with hyperlinks at the beginning of arrows that point to specific parts of the synapse. When clicking on the image I only see the png file and the hyperlinks disappeared and only arrows without description pointing to stuff so I would like to reintroduce these texts.

3
  • 2
    Take a look at the question Drawing on an image with TikZ as it seems similar. Does that help? If not, it would be useful if you could explain how your situation differs from that. Apr 19, 2012 at 9:52
  • That looks exactly like what I need. Thanks!
    – Philipp
    Apr 19, 2012 at 9:55
  • 1
    As this doesn't say TikZ must be used, I've added a link to a question with non-TikZ ways of doing this as well. Apr 19, 2012 at 10:28

1 Answer 1

41

No doubt you can use TikZ but if you just want to overlay text you don't need any extra packages at all

\begin{picture}(100,100)
\put(0,0){\includegraphics{....}}
\put(10,10){hello}
\end{picture}

will write "hello" over your image.

3
  • 1
    What does (100, 100) mean?
    – Haozhe Xie
    Nov 19, 2020 at 7:28
  • 2
    @HaozheXie make an (invisible) box 100pt x 100pt in size, in which the image is placed in bottom left (0,0) and the text placed slightly up and to the right (10,10) Nov 19, 2020 at 7:41
  • Thanks for your rapid reply.
    – Haozhe Xie
    Nov 19, 2020 at 8:18

Not the answer you're looking for? Browse other questions tagged .