1

I want to mark an angle with a little arrow to show the angle is orientated. I want to have the arrow in the middle of the arc.

\documentclass[a4paper]{article} 


\usepackage{pgf,tikz,tkz-euclide,tkz-tab}
\usetikzlibrary{arrows,fit,arrows.meta,calc,intersections,through,backgrounds,snakes, decorations.text, decorations.pathmorphing,shapes.misc,positioning,shapes,shadows,tikzmark,arrows.meta,decorations.markings}
\usetkzobj{all} 

\tikzset{arrowMe/.style={postaction=decorate,decoration={markings, mark=at position .5 with {\arrow[thick]{#1}}}}}


\begin{document}
\begin{tikzpicture}
    \tkzDefPoints{4/2/O}
    \tkzDefShiftPoint[O](0:3){A}
    \tkzDefShiftPoint[O](60:3){B}
    \tkzDrawPoints[fill=black](O,A,B)
    \tkzDrawLines[add=0 and 0.2](O,A O,B)
    \tkzLabelPoints(O,A,B)
    \tkzMarkAngle[arrowMe=stealth,size=2](A,O,B)
\end{tikzpicture}
\end{document}

Resulting in:

enter image description here

But also giving this errors: enter image description here

Any suggestions why this errors are given?

3 Answers 3

3

With the new version of tkz-euclide. You can find the new version here Euclide v3.01 or on CTAN:

\documentclass[a4paper]{article} 
\usepackage{tkz-euclide}
\usetikzlibrary{angles,decorations.markings}
\tikzset{arrowMe/.style={postaction=decorate,decoration={markings, mark=at position .5 with {\arrow[thick]{#1}}}}}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{4/2/O}
\tkzDefShiftPoint[O](0:3){A}
\tkzDefShiftPoint[O](60:3){B}
\tkzDrawPoints[fill=black](O,A,B)
\tkzDrawLines[add=0 and 0.2](O,A O,B)
\tkzLabelPoints(O,A,B)
 \tkzMarkAngle[mark=none,arrowMe=stealth,size=3](A,O,B)
\end{tikzpicture}
\end{document}

enter image description here

2

My French is not sufficient to debug this, but without tkz-euclide it is straightforward to produce this with one single \draw command.

\documentclass[a4paper]{article} 
\usepackage{tikz}
\usetikzlibrary{angles,decorations.markings}
\tikzset{arrowMe/.style={postaction=decorate,decoration={markings, mark=at position .5 with {\arrow[thick]{#1}}}}}
\begin{document}
\begin{tikzpicture}[bullet/.style={circle,inner sep=1pt,fill}]
 \draw (4,0) -- node[pos=0.2,bullet,label=below right:$A$] (A){} (0,0)
 node[bullet,label=below left:$O$] (O) {}
 -- node[pos=0.8,bullet,label=left:$B$] (B) {} (2,4)
 pic[pic actions/.style={draw,arrowMe=stealth},angle radius=2cm] {angle=A--O--B};
\end{tikzpicture}
\end{document}

enter image description here

1
  • 1
    The english version arrives ... slowly but in a few days Jan 25, 2020 at 5:39
0

Thanks to the cat of Schrödinger I combined the two to this solution, but changing the oriëntation of the arrow is not successful. :-(

\documentclass[a4paper]{article} 
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetikzlibrary{angles,decorations.markings}
\tikzset{arrowMe/.style={postaction=decorate,decoration={markings, mark=at position .5 with {\arrow[thick]{#1}}}}}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{4/2/O}
\tkzDefShiftPoint[O](0:3){A}
\tkzDefShiftPoint[O](60:3){B}
\tkzDrawPoints[fill=black](O,A,B)
\tkzDrawLines[add=0 and 0.2](O,A O,B)
\tkzLabelPoints(O,A,B)
%\tkzMarkAngle(A,O,B)
\draw pic[pic actions/.style={draw,arrowMe=stealth},angle radius=3cm] {angle=A--O--B};
\end{tikzpicture}
\end{document}
2
  • 1
    Load arrows.meta in addition, i.e. \usetikzlibrary{angles,decorations.markings,arrows.meta}, and do \draw pic[pic actions/.style={draw,arrowMe={Stealth[reversed]}},angle radius=3cm] {angle=A--O--B}; if you want to reverse the arrow. (If you have a follow-up question you may want to avoid using an answer for that.)
    – user194703
    Sep 29, 2019 at 15:21
  • @Schrödinger'scat thanks for the very simple solution!!!! This really made my day! Sep 29, 2019 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .