Tikz chains with broken arrow joins
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I am trying to write a rather long workflow diagram so with will zigzag back and forth. For personal preference of esthetics, I would like to have some of the join arrow broken rather than straight.
I am using chains as I am trying to keep the code a minimal as possible. It will eventually go into a beamer presentation where the node will be displayed one at a time.
I have tried to change the link with join=by |->
but that changes the arrow itself rather than the link.
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by |->] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[join = by -, inner sep = 0pt] ;
node[continue chain=going right] (K) K; % L shaped link preferably without intermediary node
endtikzpicture
enddocument
tikz-arrows tikz-chains
add a comment |Â
up vote
2
down vote
favorite
I am trying to write a rather long workflow diagram so with will zigzag back and forth. For personal preference of esthetics, I would like to have some of the join arrow broken rather than straight.
I am using chains as I am trying to keep the code a minimal as possible. It will eventually go into a beamer presentation where the node will be displayed one at a time.
I have tried to change the link with join=by |->
but that changes the arrow itself rather than the link.
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by |->] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[join = by -, inner sep = 0pt] ;
node[continue chain=going right] (K) K; % L shaped link preferably without intermediary node
endtikzpicture
enddocument
tikz-arrows tikz-chains
What do you call a broken arrow?
â AndréC
1 hour ago
@AndréC I have updated the post with a modified image to show what I mean.
â ArTourter
1 hour ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am trying to write a rather long workflow diagram so with will zigzag back and forth. For personal preference of esthetics, I would like to have some of the join arrow broken rather than straight.
I am using chains as I am trying to keep the code a minimal as possible. It will eventually go into a beamer presentation where the node will be displayed one at a time.
I have tried to change the link with join=by |->
but that changes the arrow itself rather than the link.
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by |->] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[join = by -, inner sep = 0pt] ;
node[continue chain=going right] (K) K; % L shaped link preferably without intermediary node
endtikzpicture
enddocument
tikz-arrows tikz-chains
I am trying to write a rather long workflow diagram so with will zigzag back and forth. For personal preference of esthetics, I would like to have some of the join arrow broken rather than straight.
I am using chains as I am trying to keep the code a minimal as possible. It will eventually go into a beamer presentation where the node will be displayed one at a time.
I have tried to change the link with join=by |->
but that changes the arrow itself rather than the link.
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by |->] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[join = by -, inner sep = 0pt] ;
node[continue chain=going right] (K) K; % L shaped link preferably without intermediary node
endtikzpicture
enddocument
tikz-arrows tikz-chains
tikz-arrows tikz-chains
edited 1 hour ago
asked 2 hours ago
ArTourter
10.3k43450
10.3k43450
What do you call a broken arrow?
â AndréC
1 hour ago
@AndréC I have updated the post with a modified image to show what I mean.
â ArTourter
1 hour ago
add a comment |Â
What do you call a broken arrow?
â AndréC
1 hour ago
@AndréC I have updated the post with a modified image to show what I mean.
â ArTourter
1 hour ago
What do you call a broken arrow?
â AndréC
1 hour ago
What do you call a broken arrow?
â AndréC
1 hour ago
@AndréC I have updated the post with a modified image to show what I mean.
â ArTourter
1 hour ago
@AndréC I have updated the post with a modified image to show what I mean.
â ArTourter
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Perhaps this is of interest. It's possible to modify the path of a join
, with the to path
option. However, you need to remove join
from the every node
style, otherwise you'll get two arrows between the nodes. One from the join
in every node
, one from the additional join=by ...
.
To make it slightly less tedious to add the join
back in, use scope
environments, or (as in the code below) the shorthand for a scope
made available by the scopes
library.
The method for positioning the K
is not ideal, I've just added some negative yshift
to it.
documentclass[tikz, border=5mm]standalone
usetikzlibrary chains, scopes % added scopes library
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, % removed join
every join/.style = ->,
]
[every node/.append style=join] % shorthand for scope environment requires scopes library
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below,
% define a custom to path to use for this join
% when you use "join=by ..." an edge is created and "..." are passed as options to the edge
join = by to path=- (tikztotarget)
] (E) E;
[every node/.append style=join]
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[continue chain=going right,
yshift=-15mm, % move node down manually
join=by to path=- (tikztotarget)] (K) K;
[every node/.append style=join]
node (I) L;
% etc
endtikzpicture
enddocument
Exactly what I was after! Thanks
â ArTourter
10 mins ago
add a comment |Â
up vote
1
down vote
Definitively not the best way
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by white] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
% node[join = by -, inner sep = 0pt] ;
node[join= by white, inner sep = 0pt] ;
node[join= by white, continue chain=going right,] (K) K; % L shaped link preferably without intermediary node
draw[->, blue] (J.south) |- (K);
draw[->, blue] (D.east) |- ++(10mm,0) -- ($(E.east) + (10mm,0)$) -> (E.east);
endtikzpicture
enddocument
That helps indeed but I was trying to make the chain join do it semi automatically rather than adding additional elements. anyway, the way to remove the original arrows, I guess, is to change theevery node
definition to not includejoin
and then add join to the nodes you want to automatically link and not to the one we define manually. That will I think be my last resort but I'll wait to see if someone comes up with a better solution.
â ArTourter
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Perhaps this is of interest. It's possible to modify the path of a join
, with the to path
option. However, you need to remove join
from the every node
style, otherwise you'll get two arrows between the nodes. One from the join
in every node
, one from the additional join=by ...
.
To make it slightly less tedious to add the join
back in, use scope
environments, or (as in the code below) the shorthand for a scope
made available by the scopes
library.
The method for positioning the K
is not ideal, I've just added some negative yshift
to it.
documentclass[tikz, border=5mm]standalone
usetikzlibrary chains, scopes % added scopes library
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, % removed join
every join/.style = ->,
]
[every node/.append style=join] % shorthand for scope environment requires scopes library
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below,
% define a custom to path to use for this join
% when you use "join=by ..." an edge is created and "..." are passed as options to the edge
join = by to path=- (tikztotarget)
] (E) E;
[every node/.append style=join]
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[continue chain=going right,
yshift=-15mm, % move node down manually
join=by to path=- (tikztotarget)] (K) K;
[every node/.append style=join]
node (I) L;
% etc
endtikzpicture
enddocument
Exactly what I was after! Thanks
â ArTourter
10 mins ago
add a comment |Â
up vote
3
down vote
accepted
Perhaps this is of interest. It's possible to modify the path of a join
, with the to path
option. However, you need to remove join
from the every node
style, otherwise you'll get two arrows between the nodes. One from the join
in every node
, one from the additional join=by ...
.
To make it slightly less tedious to add the join
back in, use scope
environments, or (as in the code below) the shorthand for a scope
made available by the scopes
library.
The method for positioning the K
is not ideal, I've just added some negative yshift
to it.
documentclass[tikz, border=5mm]standalone
usetikzlibrary chains, scopes % added scopes library
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, % removed join
every join/.style = ->,
]
[every node/.append style=join] % shorthand for scope environment requires scopes library
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below,
% define a custom to path to use for this join
% when you use "join=by ..." an edge is created and "..." are passed as options to the edge
join = by to path=- (tikztotarget)
] (E) E;
[every node/.append style=join]
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[continue chain=going right,
yshift=-15mm, % move node down manually
join=by to path=- (tikztotarget)] (K) K;
[every node/.append style=join]
node (I) L;
% etc
endtikzpicture
enddocument
Exactly what I was after! Thanks
â ArTourter
10 mins ago
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Perhaps this is of interest. It's possible to modify the path of a join
, with the to path
option. However, you need to remove join
from the every node
style, otherwise you'll get two arrows between the nodes. One from the join
in every node
, one from the additional join=by ...
.
To make it slightly less tedious to add the join
back in, use scope
environments, or (as in the code below) the shorthand for a scope
made available by the scopes
library.
The method for positioning the K
is not ideal, I've just added some negative yshift
to it.
documentclass[tikz, border=5mm]standalone
usetikzlibrary chains, scopes % added scopes library
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, % removed join
every join/.style = ->,
]
[every node/.append style=join] % shorthand for scope environment requires scopes library
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below,
% define a custom to path to use for this join
% when you use "join=by ..." an edge is created and "..." are passed as options to the edge
join = by to path=- (tikztotarget)
] (E) E;
[every node/.append style=join]
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[continue chain=going right,
yshift=-15mm, % move node down manually
join=by to path=- (tikztotarget)] (K) K;
[every node/.append style=join]
node (I) L;
% etc
endtikzpicture
enddocument
Perhaps this is of interest. It's possible to modify the path of a join
, with the to path
option. However, you need to remove join
from the every node
style, otherwise you'll get two arrows between the nodes. One from the join
in every node
, one from the additional join=by ...
.
To make it slightly less tedious to add the join
back in, use scope
environments, or (as in the code below) the shorthand for a scope
made available by the scopes
library.
The method for positioning the K
is not ideal, I've just added some negative yshift
to it.
documentclass[tikz, border=5mm]standalone
usetikzlibrary chains, scopes % added scopes library
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, % removed join
every join/.style = ->,
]
[every node/.append style=join] % shorthand for scope environment requires scopes library
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below,
% define a custom to path to use for this join
% when you use "join=by ..." an edge is created and "..." are passed as options to the edge
join = by to path=- (tikztotarget)
] (E) E;
[every node/.append style=join]
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
node[continue chain=going right,
yshift=-15mm, % move node down manually
join=by to path=- (tikztotarget)] (K) K;
[every node/.append style=join]
node (I) L;
% etc
endtikzpicture
enddocument
answered 14 mins ago
Torbjørn T.
152k13244426
152k13244426
Exactly what I was after! Thanks
â ArTourter
10 mins ago
add a comment |Â
Exactly what I was after! Thanks
â ArTourter
10 mins ago
Exactly what I was after! Thanks
â ArTourter
10 mins ago
Exactly what I was after! Thanks
â ArTourter
10 mins ago
add a comment |Â
up vote
1
down vote
Definitively not the best way
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by white] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
% node[join = by -, inner sep = 0pt] ;
node[join= by white, inner sep = 0pt] ;
node[join= by white, continue chain=going right,] (K) K; % L shaped link preferably without intermediary node
draw[->, blue] (J.south) |- (K);
draw[->, blue] (D.east) |- ++(10mm,0) -- ($(E.east) + (10mm,0)$) -> (E.east);
endtikzpicture
enddocument
That helps indeed but I was trying to make the chain join do it semi automatically rather than adding additional elements. anyway, the way to remove the original arrows, I guess, is to change theevery node
definition to not includejoin
and then add join to the nodes you want to automatically link and not to the one we define manually. That will I think be my last resort but I'll wait to see if someone comes up with a better solution.
â ArTourter
1 hour ago
add a comment |Â
up vote
1
down vote
Definitively not the best way
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by white] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
% node[join = by -, inner sep = 0pt] ;
node[join= by white, inner sep = 0pt] ;
node[join= by white, continue chain=going right,] (K) K; % L shaped link preferably without intermediary node
draw[->, blue] (J.south) |- (K);
draw[->, blue] (D.east) |- ++(10mm,0) -- ($(E.east) + (10mm,0)$) -> (E.east);
endtikzpicture
enddocument
That helps indeed but I was trying to make the chain join do it semi automatically rather than adding additional elements. anyway, the way to remove the original arrows, I guess, is to change theevery node
definition to not includejoin
and then add join to the nodes you want to automatically link and not to the one we define manually. That will I think be my last resort but I'll wait to see if someone comes up with a better solution.
â ArTourter
1 hour ago
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Definitively not the best way
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by white] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
% node[join = by -, inner sep = 0pt] ;
node[join= by white, inner sep = 0pt] ;
node[join= by white, continue chain=going right,] (K) K; % L shaped link preferably without intermediary node
draw[->, blue] (J.south) |- (K);
draw[->, blue] (D.east) |- ++(10mm,0) -- ($(E.east) + (10mm,0)$) -> (E.east);
endtikzpicture
enddocument
Definitively not the best way
documentclass[tikz]standalone
usetikzlibrarypositioning, calc, arrows, chains
begindocument
% https://tex.stackexchange.com/questions/56427/how-to-evenly-space-out-nodes-or-in-tikz
begintikzpicture[
start chain,
node distance = 15mm,
every node/.style = inner sep = 2mm, on chain, join,
every join/.style = ->,
]
node (A) A;
node (B) B;
node (C) C;
node (D) D;
node[continue chain=going below, join = by white] (E) E; % would like the join to be U shaped rather than straight down
node[continue chain=going left] (F) F;
node (G) G;
node (H) H;
node (I) I;
node[continue chain=going below, align=center] (J) J;
% node[join = by -, inner sep = 0pt] ;
node[join= by white, inner sep = 0pt] ;
node[join= by white, continue chain=going right,] (K) K; % L shaped link preferably without intermediary node
draw[->, blue] (J.south) |- (K);
draw[->, blue] (D.east) |- ++(10mm,0) -- ($(E.east) + (10mm,0)$) -> (E.east);
endtikzpicture
enddocument
edited 1 hour ago
answered 1 hour ago
flav
3,3671625
3,3671625
That helps indeed but I was trying to make the chain join do it semi automatically rather than adding additional elements. anyway, the way to remove the original arrows, I guess, is to change theevery node
definition to not includejoin
and then add join to the nodes you want to automatically link and not to the one we define manually. That will I think be my last resort but I'll wait to see if someone comes up with a better solution.
â ArTourter
1 hour ago
add a comment |Â
That helps indeed but I was trying to make the chain join do it semi automatically rather than adding additional elements. anyway, the way to remove the original arrows, I guess, is to change theevery node
definition to not includejoin
and then add join to the nodes you want to automatically link and not to the one we define manually. That will I think be my last resort but I'll wait to see if someone comes up with a better solution.
â ArTourter
1 hour ago
That helps indeed but I was trying to make the chain join do it semi automatically rather than adding additional elements. anyway, the way to remove the original arrows, I guess, is to change the
every node
definition to not include join
and then add join to the nodes you want to automatically link and not to the one we define manually. That will I think be my last resort but I'll wait to see if someone comes up with a better solution.â ArTourter
1 hour ago
That helps indeed but I was trying to make the chain join do it semi automatically rather than adding additional elements. anyway, the way to remove the original arrows, I guess, is to change the
every node
definition to not include join
and then add join to the nodes you want to automatically link and not to the one we define manually. That will I think be my last resort but I'll wait to see if someone comes up with a better solution.â ArTourter
1 hour ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454381%2ftikz-chains-with-broken-arrow-joins%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What do you call a broken arrow?
â AndréC
1 hour ago
@AndréC I have updated the post with a modified image to show what I mean.
â ArTourter
1 hour ago