7

Why the arc does not fit over the circle if we use -latex arrow tip? Maybe some bug or some bad math computations?

enter image description here

MWE

\documentclass[11pt,margin=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}
\draw         (0:1cm) arc (0: 180:1cm) arc (180:0:1cm and 2cm);
\draw         (0:1cm) arc (0:-180:1cm);
\draw[->]     (0:1cm) arc (0:  80:1cm);
\draw[-latex] (0:1cm) arc (0:- 80:1cm);
\end{tikzpicture}
\end{document}
  • 3
    You will find a description of why this is happening in the manual 16.3.8 (it is not an error). To avoid it use \usetikzlibrary{bending}. – hpekristiansen Dec 26 '16 at 18:08
  • @Hans-PeterE.Kristiansen, perfect! It solved my problem. If you wish, please, post an answer. – Sigur Dec 26 '16 at 18:17
  • -latex isn't provided by arrows.meta, is it? Doesn't that provide -Latex? – cfr Dec 26 '16 at 20:56
  • @cfr, sorry. To be true, that library I am using in other code part. – Sigur Dec 26 '16 at 22:23
  • I think decorations.markings is better than bending in this case – Symbol 1 Dec 28 '16 at 14:26
4

This is a solution using marking. It does not draw any additional curve. Thus there is no chance to have any curve overlap.

\documentclass[11pt,margin=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,decorations.markings}

\begin{document}

\tikzset{
    arrow at end/.style={
        decorate,decoration={
            markings,
            mark=at position .999 with{
                \arrow{#1};
            }
        }
    }
}

\begin{tikzpicture}
\draw                    (0:1cm) arc (0: 180:1cm) arc (180:0:1cm and 2cm);
\draw                    (0:1cm) arc (0:-180:1cm);
\draw[arrow at end=>]    (0:1cm) arc (0:  80:1cm);
\draw[arrow at end=latex](0:1cm) arc (0:- 80:1cm);
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.