Tikz: issue when combining arcs and arrows?











up vote
2
down vote

favorite












While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.



documentclass{standalone} 
usepackage{tikz}

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here










share|improve this question


















  • 1




    Interesting. It is even worse if you use latex-latex instead of <->.
    – Peter Grill
    yesterday















up vote
2
down vote

favorite












While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.



documentclass{standalone} 
usepackage{tikz}

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here










share|improve this question


















  • 1




    Interesting. It is even worse if you use latex-latex instead of <->.
    – Peter Grill
    yesterday













up vote
2
down vote

favorite









up vote
2
down vote

favorite











While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.



documentclass{standalone} 
usepackage{tikz}

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here










share|improve this question













While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.



documentclass{standalone} 
usepackage{tikz}

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here







tikz-pgf arc






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









pluton

7,885960129




7,885960129








  • 1




    Interesting. It is even worse if you use latex-latex instead of <->.
    – Peter Grill
    yesterday














  • 1




    Interesting. It is even worse if you use latex-latex instead of <->.
    – Peter Grill
    yesterday








1




1




Interesting. It is even worse if you use latex-latex instead of <->.
– Peter Grill
yesterday




Interesting. It is even worse if you use latex-latex instead of <->.
– Peter Grill
yesterday










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










better rendering provides use of tikz library arrows.meta with help of bending:



documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here



from tikz & pgf manual:





  • "Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and

  • "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
    When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
    segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
    operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
    add many small line segments to paths. The important point is that if this first segment is very small,
    namely smaller that the arrow tip itself, strange things may result."






share|improve this answer























  • so essentially we have to call usetikzlibrary{arrows.meta,bending} as soon as arrows are drawn. Looks a bit heavy but that's ok.
    – pluton
    yesterday












  • @pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
    – Zarko
    yesterday











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: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
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%2f460885%2ftikz-issue-when-combining-arcs-and-arrows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










better rendering provides use of tikz library arrows.meta with help of bending:



documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here



from tikz & pgf manual:





  • "Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and

  • "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
    When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
    segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
    operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
    add many small line segments to paths. The important point is that if this first segment is very small,
    namely smaller that the arrow tip itself, strange things may result."






share|improve this answer























  • so essentially we have to call usetikzlibrary{arrows.meta,bending} as soon as arrows are drawn. Looks a bit heavy but that's ok.
    – pluton
    yesterday












  • @pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
    – Zarko
    yesterday















up vote
2
down vote



accepted










better rendering provides use of tikz library arrows.meta with help of bending:



documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here



from tikz & pgf manual:





  • "Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and

  • "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
    When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
    segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
    operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
    add many small line segments to paths. The important point is that if this first segment is very small,
    namely smaller that the arrow tip itself, strange things may result."






share|improve this answer























  • so essentially we have to call usetikzlibrary{arrows.meta,bending} as soon as arrows are drawn. Looks a bit heavy but that's ok.
    – pluton
    yesterday












  • @pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
    – Zarko
    yesterday













up vote
2
down vote



accepted







up vote
2
down vote



accepted






better rendering provides use of tikz library arrows.meta with help of bending:



documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here



from tikz & pgf manual:





  • "Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and

  • "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
    When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
    segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
    operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
    add many small line segments to paths. The important point is that if this first segment is very small,
    namely smaller that the arrow tip itself, strange things may result."






share|improve this answer














better rendering provides use of tikz library arrows.meta with help of bending:



documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added

defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}

begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}


enter image description here



from tikz & pgf manual:





  • "Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and

  • "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
    When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
    segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
    operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
    add many small line segments to paths. The important point is that if this first segment is very small,
    namely smaller that the arrow tip itself, strange things may result."







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered yesterday









Zarko

116k865154




116k865154












  • so essentially we have to call usetikzlibrary{arrows.meta,bending} as soon as arrows are drawn. Looks a bit heavy but that's ok.
    – pluton
    yesterday












  • @pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
    – Zarko
    yesterday


















  • so essentially we have to call usetikzlibrary{arrows.meta,bending} as soon as arrows are drawn. Looks a bit heavy but that's ok.
    – pluton
    yesterday












  • @pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
    – Zarko
    yesterday
















so essentially we have to call usetikzlibrary{arrows.meta,bending} as soon as arrows are drawn. Looks a bit heavy but that's ok.
– pluton
yesterday






so essentially we have to call usetikzlibrary{arrows.meta,bending} as soon as arrows are drawn. Looks a bit heavy but that's ok.
– pluton
yesterday














@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday




@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460885%2ftikz-issue-when-combining-arcs-and-arrows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux