How to correctly align arrow tip

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?










share|improve this question





















  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    Sep 10 at 20:34















up vote
3
down vote

favorite












I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?










share|improve this question





















  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    Sep 10 at 20:34













up vote
3
down vote

favorite









up vote
3
down vote

favorite











I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?










share|improve this question













I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?







tikz-pgf tikz-arrows






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 10 at 20:27









ojenn

574




574











  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    Sep 10 at 20:34

















  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    Sep 10 at 20:34
















Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
– Jasper Habicht
Sep 10 at 20:34





Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
– Jasper Habicht
Sep 10 at 20:34











2 Answers
2






active

oldest

votes

















up vote
5
down vote



accepted










You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer


















  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    Sep 10 at 20:39










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    Sep 10 at 20:45










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    Sep 10 at 20:48










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    Sep 10 at 21:19

















up vote
4
down vote













I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer


















  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    Sep 10 at 23:25










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450299%2fhow-to-correctly-align-arrow-tip%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote



accepted










You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer


















  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    Sep 10 at 20:39










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    Sep 10 at 20:45










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    Sep 10 at 20:48










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    Sep 10 at 21:19














up vote
5
down vote



accepted










You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer


















  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    Sep 10 at 20:39










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    Sep 10 at 20:45










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    Sep 10 at 20:48










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    Sep 10 at 21:19












up vote
5
down vote



accepted







up vote
5
down vote



accepted






You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer














You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument






share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 10 at 21:18

























answered Sep 10 at 20:37









AndréC

3,336729




3,336729







  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    Sep 10 at 20:39










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    Sep 10 at 20:45










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    Sep 10 at 20:48










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    Sep 10 at 21:19












  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    Sep 10 at 20:39










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    Sep 10 at 20:45










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    Sep 10 at 20:48










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    Sep 10 at 21:19







1




1




Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
– Jasper Habicht
Sep 10 at 20:39




Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
– Jasper Habicht
Sep 10 at 20:39












@JasperHabicht Indeed, I have not changed the parameters of the question.
– AndréC
Sep 10 at 20:45




@JasperHabicht Indeed, I have not changed the parameters of the question.
– AndréC
Sep 10 at 20:45












Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
– ojenn
Sep 10 at 20:48




Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
– ojenn
Sep 10 at 20:48












@JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
– AndréC
Sep 10 at 21:19




@JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
– AndréC
Sep 10 at 21:19










up vote
4
down vote













I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer


















  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    Sep 10 at 23:25














up vote
4
down vote













I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer


















  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    Sep 10 at 23:25












up vote
4
down vote










up vote
4
down vote









I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer














I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 10 at 23:41









marmot

61.4k465133




61.4k465133










answered Sep 10 at 22:22









Diaa

2,3451642




2,3451642







  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    Sep 10 at 23:25












  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    Sep 10 at 23:25







1




1




@marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
– Diaa
Sep 10 at 23:25




@marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
– Diaa
Sep 10 at 23:25

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450299%2fhow-to-correctly-align-arrow-tip%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay