Graphics, Figures & Tables ⇒ Double arrow in tikZ
Double arrow in tikZ
I trying to create a diagram that describe the system I'm using.
I want the diagram to have double arrows but the only way I found was using the double command which create ugly arrowheads. Also, I couldn't find the way to apply using the \draw command.
I found a 2 years old thread in the forum which suggest using the implies style but this doesn't seems to work (maybe an updted version) .
any thought?
Yotam
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Double arrow in tikZ
the shapes.arrows library offers you the double arrow shape that could be useful for you. Please, refer to the pgfmanual, section 39.5 Arrow Shapes.
Double arrow in tikZ
Here is what I want:
Code: Select all
\documentclass{article} % say\usepackage{tikz}\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}\begin{document}\node (A) [rectangle] at(0,0){I am A};\node (B) [rectangle] at(0,2){I am B};\draw[->] (A.north) -- (B.south);\begin{tikzpicture}\end{tikzpicture}\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Double arrow in tikZ
Why don't you just show the code of this diagram?yotama9 wrote:[...] I want the diagram to have double arrows but the only way I found was using the double command which create ugly arrowheads. Also, I couldn't find the way to apply using the \draw command. [...]
Why don't you just give the link to that thread?yotama9 wrote:[...] I found a 2 years old thread in the forum which suggest using the implies style but this doesn't seems to work (maybe an updted version). [...]
This is very confusing. Of course the manual shows you how to use arrows.yotama9 wrote:[...] I need to use the arrows to connect between nodes. There is no writing on how to use the arrows to connect two dots in a certain distance. [...]
Code: Select all
\documentclass{minimal}\usepackage{tikz}\usetikzlibrary{arrows}\begin{document}\begin{tikzpicture}[>=stealth]\node[draw,rectangle] (A) at (0,0) {I am A};\node[draw,rectangle] (B) at (0,2) {I am B};\draw[double,->] (A.north) -- (B.south);\end{tikzpicture}\end{document}
Perhaps you should explain clearly which part of the arrow shall be doubled. In the above code there is a proper double line for the arrow, but a single arrow tip.
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Double arrow in tikZ
Code: Select all
\documentclass{article} % say\usepackage{tikz}\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}\begin{document}\begin{tikzpicture}[unit/.style={rectangle,fill=black!3,draw,thick,minimum size = 1cm, text width = 2.5cm, text badly ragged},point/.style={circle,fill=black, minimum size = 1}]\node (mil) at (0,0) [unit] {Milenia X};\node (tsun) at (0,-5) [unit] {Ti:Sapphire 1ps 680-1080 nm 82 MHz};\node (split) at (0,-7.5) [point] [label=above right:beam splitter] {};\node (pp) at (0,-10) [unit] {Pulse Picker};\node (double) at (0,-15) [unit] {Second Harmonic Generator};\node (sample) at (10,-15) [unit] {Sample};\node (mono) at (10,-12.86) [unit] {double mono - chromator};\node (multi) at (10,-10.72) [unit] {Multi Channel Plate};\node (amp) at (10,-8.58) [unit] {Amplifier 1 - 2 GHz};\node (CFD1) at (10,-6.44) [unit] {Constant Fraction Discriminator};\node (tac) at (10,-4.3) [unit] {TAC};\node (CFD2) at (5,-4.3) [unit] {Constant Fraction Discriminator};\node (diode) at (5,-7.5) [unit] {Fast Photodiode 300ps};\node (MCA) at (10,-2.14) [unit] {Multi Channel Analyser};\node (pc) at (10,0) [unit] {Computer};\node (image) at (4,-1) [unit, minimum size = 4cm, fill = blue!50] {Image};\node (fix1) [right=of image] {};\node (fix2) [above=of fix1, left=of pc]{};\draw [->] (mil.south) -- (tsun.north);\draw (tsun.south) -- (split.center);\draw [->](split.south) -- (pp.north);\draw [->](pp.south) -- (double.north);\draw [->] (double.east) -- (sample.west);\draw [->] (sample.north) -- (mono.south);\draw [->] (mono.north) -- (multi.south);\draw [->] (multi.north) -- (amp.south);\draw [->] (amp.north) -- (CFD1.south);\draw [->] (CFD1.north) -- (tac.south);\draw [->] (tac.north) -- (MCA.south);\draw [->] (MCA.north) -- (pc.south);
Code: Select all
\draw [->] (mil.south) -- (tsun.north);
Code: Select all
\draw [->,double] (mil.south) -- (tsun.north);
This is the thread I have found:
http://www.latex-community.org/forum/vi ... ikz#p20038
Yotam
Re: Double arrow in tikZ
\draw [very thick,double,double distance=3pt,->,>=stealth,shorten >=2pt] (mil.south) -- (tsun.north);
That'll draw a thick double line with a width of 3pt between the two lines, with a stealth arrow tip pointing at (tsun.north) which stops 2 points before the node.
But you can customize this to pretty much anything you want. Section 14.3 of the TikZ/PGF manual is very helpful here.
Re: Double arrow in tikZ
I searched for the double arrow or the double line command and I only found examples were I use only one double.
Yotam
Re: Double arrow in tikZ
In any case, is it helpful to you at all?
Re: Double arrow in tikZ
14.3.4 Graphic Parameters: Arrow Tips (pag. 134)
14.3.5 Graphic Parameters: Double Lines and Bordered Lines (pag. 136)
22 Arrow Tips Library (pag.224)
39.5 Arrow Shapes (pag. 334)
58 Arrow Tips (pag. 466)
Re: Double arrow in tikZ
It will take me some time but I'll do it.
Thanks.