The pgf/TikZ manual suggests using the command \pgftext
to insert external graphics (section 53.3.3 "Inserting Text and Images"). Here's an example taken from this seminar (slides 5 and 6 in the presentation version):
\begin{figure}
\begin{tikzpicture}
\pgftext{%
\includegraphics[width=\textwidth]{Bridge05a}%
}%
\node[fill=black, opacity=.5, text opacity=1] at (0,.5) {\Large \color{yellow} Geometry};
\node[fill=black, opacity=.5, text opacity=1] at (0,-.5) {\Large \color{red} \emph{Manifolds}};
\node[fill=black, opacity=.5, text opacity=1] at (-4,.5) {\Large \color{yellow} Algebra};
\node[fill=black, opacity=.5, text opacity=1] at (4,.5) {\Large \color{yellow} Analysis};
\end{tikzpicture}
\end{figure}
There is also a hint elsewhere in the manual (in 53.3.1) that the command \pgfimage
can be used instead of \includegraphics
(although still within the \pgftext
command); however, searching for \pgfimage
in the manual doesn't turn up any further explanation of this command.
The \pgftext
command is something of a special command. It "escapes" out of the current picture back to "normal TeX". It is, therefore, somewhat like a \node
command. It works by constructing a box which is then put into the picture. By default this box is put at the current origin. A simple way to move it, therefore, is to (temporarily) tell TikZ/PGF to move the origin priori to issuing the \pgftext
command.
An alternative way of positioning it is to use the initial optional argument. Thus one can say \pgftext[<positioning information>]{text}
where <positioning information>
is some set of PGF keys that relocate the box. These are similar to the positioning of a \node
, but have a slightly "low level" feel to them. For example, to locate the box at a particular point one would say \pgftext[at={\pgfpoint{1cm}{2cm}}]{text}
. Note the \pgfpoint
syntax rather than the TikZ coordinate syntax.
In the 2.10-CVS version of the manual, the \pgftext
command is documented in Section 77.3.3. There is also some important information about how it interacts with scopes in Section 77.1.2 (note especially item 5 about the ability to put another pgfpicture
inside a \pgftext
command, something that should never be done with \node
!).
In summary, \pgftext
is somewhat akin to \node
in that it allows you to put "normal TeX" in your picture. However, the two are different in that a \node
is considered part of the picture but \pgftext
is for things that are meant to be somewhat separate.