## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Tikz chain labels for nodes with includegraphics

Information and discussion about graphics, figures & tables in LaTeX documents.
megaflop
Posts: 2
Joined: Fri Dec 28, 2012 11:21 am

### Tikz chain labels for nodes with includegraphics

Hello everyone!
I'm trying to draw a network diagram using tikz and Cisco symbols.
I have the cisco symbols in the folder
figs/Cisco/3015_eps/

When I use the following code:
\usepackage{tikz}\usetikzlibrary{chains}\usetikzlibrary{positioning}\usepackage{epstopdf}\begin{tikzpicture}[start chain=going right,diagram item/.style={on chain,join}]\node[diagram item,label=Internet](Internet){\includegraphics[width=6pc]{figs/Cisco/3015_eps/cloud}};\node[diagram item,label=Backbone](Backbone){\includegraphics[width=6pc]{figs/Cisco/3015_eps/netranger}};\node[diagram item,label=BRAS](BRAS){\includegraphics[width=6pc]{figs/Cisco/3015_eps/router}};\node[continue chain=going right,diagram item,label=AAA](AAA){\includegraphics[width=5pc]{figs/Cisco/3015_eps/pad}};\node[continue chain=going below,diagram item,label=left:Switch](Switch){\includegraphics[width=6pc]{figs/Cisco/3015_eps/workgroup_switch}};\node[diagram item,label=left:DSLAM](DSLAM){\includegraphics[width=4.5pc]{figs/Cisco/3015_eps/dslam}};\node[diagram item,label=left:Filtre](Filtre){\includegraphics[width=1.5pc]{figs/Cisco/3015_eps/pad}};\node[start branch=1 going right,diagram item,label=right:phone](Phone){\includegraphics[width=6pc]{figs/Cisco/3015_eps/phone}};\node [diagram item,label=below:PC](PC){\includegraphics[width=6pc]{figs/Cisco/3015_eps/pc}};\end{tikzpicture}

I attached the result to this post.
What I want to do is to put the switch (and everything that's beneath it) under the BRAS not under the AAA I can't figure out how to do it.
And of course the labels are misplaced I don't understand why.
Can someone help please ? :)
Attachments
Untitled-1.jpg (53 KiB) Viewed 3464 times

Tags:

megaflop
Posts: 2
Joined: Fri Dec 28, 2012 11:21 am
I forgot to mention that the Cisco icons could be found here http://www.cisco.com/web/about/ac50/ac47/2.html. Not that it really matters.

Stefan Kottwitz
Posts: 8253
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi,

welcome to the board!

megaflop wrote:What I want to do is to put the switch (and everything that's beneath it) under the BRAS not under the AAA

I guess you need to make a branch before AAA instead of going below after AAA.

megaflop wrote:And of course the labels are misplaced I don't understand why.

Not when I compile your code. I got:

network.png (13.65 KiB) Viewed 3442 times

Some images are missing, perhaps an issue with the eps pictures, but that's not the question here. The labels look better than in your output, even if I did not change the code. Perhaps update your TikZ package if it's not a current version.

If there's still a problem, I suggest that you should post a minimal working example, i.e. a compilable short version. Your remaining packages and settings are unknown. And it would be better if you would add simple things such as class, \begin{document}, \end{document} etc. if you would like readers to test your code. Otherwise every reader has to fix and to complete the code again - not everybody does it. Also I postponed an answer until I had some time to deal with incomplete code.

Stefan