I want to label the images img1 and img2.. can i do that inside my \node?
If yes, how??
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\path (0,0) node(a) {\includegraphics[width=2cm] images/img1.png}};
\path (1,6) node(b) {\includegraphics[width=2cm]{images/img2.png}};
\path (9,6) node(c) {\includegraphics[width=2cm]{images/img3.png}};
\path (10,0) node(d) {\includegraphics[width=2cm]{images/img4.png}};
\draw[very thick,green] (a) -- (b) node [midway,right]{\parbox{4cm}{TLS Password Based\\ Authentication}};
\draw[very thick,red] (b) -- (c) node [midway,above]{Certificate based Authentication};
\draw[very thick,green] (c) --(d);
\end{tikzpicture}
\end{document}
What i mean by label is that something like this..
\path (\x,\y) node(a) [rectangle, draw,thick] {This is a rectangle};
Something like this as shown in figureas "Alice", "Bob", SIP Proxy Server Domain" etc..




\ref{..}command show in this case? There are no numbers referred to each image. – Spike Jun 28 '12 at 12:35\labelto refer to the images, or do you want to add a text label on top of the image? – Jake Jun 28 '12 at 12:37\captioninside the main picture, I think the answer is no. – Alain Matthes Jun 28 '12 at 14:39\path (\x,\y) node(a) [rectangle, draw,thick] {This is an element};– Vineet Menon Jun 29 '12 at 5:41