Featured Book

LaTeX Beginners Guide

Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 7 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Tikz chain labels for nodes with includegraphics

chainsdiagramsTikZAdd tags Information and discussion about graphics, figures & tables in LaTeX documents.

Tikz chain labels for nodes with includegraphics

Postby megaflop on Fri Dec 28th, 2012

Hello everyone!
I'm trying to draw a network diagram using tikz and Cisco symbols.
I have the cisco symbols in the folder
Code: Select all  •  Open in writeLaTeX
figs/Cisco/3015_eps/

When I use the following code:
Code: Select all  •  Open in writeLaTeX
\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
Untitled-1.jpg (53 KiB) Viewed 1452 times
megaflop
 
Posts: 2
Joined: Fri Dec 28th, 2012

Re: Tikz chain labels for nodes with includegraphics

Postby megaflop on Fri Dec 28th, 2012

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.
megaflop
 
Posts: 2
Joined: Fri Dec 28th, 2012

Re: Tikz chain labels for nodes with includegraphics

Postby Stefan_K on Sat Dec 29th, 2012

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
network.png (13.65 KiB) Viewed 1430 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
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6517
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany


Topic Tags

chainsdiagramsTikZ

Return to Graphics, Figures & Tables

Who is online

Users browsing this forum: No registered users and 7 guests