# Suggestion for either a pin or a hooked arrow to label an angle in a TikZ diagram

The following code renders a circle circumscribing a triangle. One angle is marked $\theta$. I would like the other angle to be marked $90 - \theta$. There is not room it where it belongs. I am looking for suggestions on "pins" or hooked arrows. In either case, the end of the "pin" or hooked arrow should be at the green dot.

\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%

%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in ($(B)!2.5mm!(O)$) arc (-60:{\n1-180}:0.25);
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in node[anchor={0.5*((\n1-180)-60)+180}, inner sep=0, font=\tiny] at ($(B) +({0.5*((\n1-180)-60)}:0.3)$){$\theta$};

%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C)!3.5mm!(B)$) arc ({\n2-180}:{\n1-180}:0.35);
\draw[fill=green] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C) +({0.5*(\n1+\n2)-180}:0.45)$) circle (1pt);

\end{tikzpicture}

\end{document}


\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%

%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in ($(B)!2.5mm!(O)$) arc (-60:{\n1-180}:0.25);
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in node[anchor={0.5*((\n1-180)-60)+180}, inner sep=0, font=\tiny] at ($(B) +({0.5*((\n1-180)-60)}:0.3)$){$\theta$};

%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C)!3.5mm!(B)$) arc ({\n2-180}:{\n1-180}:0.35);
\draw[fill=green] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C) +({0.5*(\n1+\n2)-180}:0.45)$)
coordinate(X) circle (1pt);

\draw[latex-,shorten <=1pt] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)},
\p2=($(B)-(C)$), \n2={\n1+atan(\y2/\x2)} in (X)
to[out={0.5*\n2-180},in=-90,looseness=2]
++ (-12pt,18pt) node[above]{$90^\circ-\theta$};
\end{tikzpicture}
\end{document} If you really want a hook, you may want to load the arrows.meta library.

\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{calc,intersections,arrows.meta}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%

%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in ($(B)!2.5mm!(O)$) arc (-60:{\n1-180}:0.25);
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in node[anchor={0.5*((\n1-180)-60)+180}, inner sep=0, font=\tiny] at ($(B) +({0.5*((\n1-180)-60)}:0.3)$){$\theta$};

%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C)!3.5mm!(B)$) arc ({\n2-180}:{\n1-180}:0.35);
\draw[fill=green] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C) +({0.5*(\n1+\n2)-180}:0.45)$)
coordinate(X) circle (1pt);
\draw[{Hooks[]}-,shorten <=1pt] (X) to[out=90,in=-90] ++ (3pt,18pt)
node[above]{$90^\circ-\theta$};

\end{tikzpicture}

\end{document} And for completeness: there is an arguably simpler way to draw the angle arcs, namely with the angles library.

\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{angles,quotes,plotmarks}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%

\path (A) -- (B) -- (O)
angle eccentricity=2,"$\theta$"] {angle = A--B--O};

\path (B) -- (C) -- (A)
angle eccentricity=2,"{\pgfuseplotmark{*}}"
{green,name=X,pin=100:{\tiny$90^\circ-\theta$}}] {angle = B--C--A};

\end{tikzpicture}
\end{document} • The first diagram is close to what I want. See the second diagram from J Leon V.. Can I use something like the following code? Aug 1, 2018 at 12:18
• \draw[latex-,shorten <=1pt] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in (X) to[out={0.5*(\n1+\n2)-180},in=-90] ++ (3pt,18pt); Aug 1, 2018 at 12:19
– user121799
Aug 1, 2018 at 13:04
• Yes, that is the diagram that I wanted. Thanks. Aug 1, 2018 at 15:35
• @user74973 Good question. I guess it has to do that it is quite a hack to allow some sort of variable names like \n1, TeX usually does not allow numbers in macro names, and the parser tries to parse \n1+\n2 as \n{1+\n2}, which gives rubbish.
– user121799
Aug 1, 2018 at 15:38

An option using tkz-euclide

MWE:

\documentclass[border=2mm]{standalone}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{tkz-euclide}
\usetikzlibrary{arrows.meta}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
% Set limits.
\tkzInit[xmin=-4,xmax=11,ymax=5, ymin=-5]
\tkzGrid[sub,color=blue!10!,subxstep=.5,subystep=.5]
\tkzClip
%Define principal points.
\tkzDefPoint(0,0){O}
\tkzDefShiftPoint[O](70:3){A}
\tkzDefShiftPoint[O](120:3){B}
\tkzDefShiftPoint[O](190:3){C}

%Define principal points.
\tkzDefPoint(7,0){O'}
\tkzDefShiftPoint[O'](50:3){A'}
\tkzDefShiftPoint[O'](120:3){B'}
\tkzDefShiftPoint[O'](190:3){C'}

%Draw the circle
\tkzDrawCircle[R,blue](O,3cm)
\tkzDrawCircle[R,blue](O',3cm)

% Draw angles
\tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](C,B,O)
\tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](B,A,C)

\tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](C',B',O')
\tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](B',A',C')

% Draw all segments.
\tkzDrawSegments[thick,dashed](O,C O,B)
\tkzDrawSegments[thick](C,A B,A B,C)

\tkzDrawSegments[thick,dashed](O',C' O',B')
\tkzDrawSegments[thick](C',A' B',A' B',C')

% Draw specific points.
\tkzDrawPoints[fill=white,size=7pt](A,B,C)
\tkzDrawPoints[fill=black,size=12pt](O)

%       \tkzDrawPoints[fill=red,size=10pt](A',B',C')
\tkzDrawPoints[fill=black,size=12pt](O')

% Label points
\tkzLabelPoints[color=blue,opacity=.7,above](A,B)
\tkzLabelPoints[color=blue,opacity=.7,left](C)
\tkzLabelPoints[color=blue,opacity=.7,below =5pt](O)

% Label angles.
\tkzLabelAngle[pos = .7](C,B,O){$\theta$}
\tkzLabelAngle[pos =-1.2, rotate=25](B,A,C){$90-\theta$}

\tkzLabelAngle[pos = .8](C',B',O'){$\theta$}
%           \tkzLabelAngle[pos =-1.2, rotate=25](B',A',C'){$\theta-90$}

\draw[thick, Stealth-] (A')++(190:14.pt) to [in=-90,out=190] ++(-1,1.2) node[anchor=south] {$90-\theta$};
% You can mark the segments
\tkzMarkSegments[mark=||,pos=0.6](B,O C,O)
\end{tikzpicture}
\end{document}

• +1. Very very nice also your work. Aug 1, 2018 at 8:14
• I want a diagram like your second diagram ... but using only TikZ code. Aug 1, 2018 at 11:38
• The macros in tkz-euclide in the background are tikz code. Aug 1, 2018 at 15:31