2

NOTE: These triangles are being generated en masse so moving the labels manually is not an option.

New to Tikz, trying to label angles of a triangle but am getting some strange (seemingly) inconsistent formatting problems. For example, my latex for one triangle looks like this

\documentclass{article}
\usepackage{gensymb}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[thick]
\coordinate (A) at (0,0);
\coordinate (B) at (2,3);
\coordinate (C) at (4,0);
\draw (A)--(B)--(C)--cycle;
\tkzLabelPoints[left=2pt](A)
\tkzLabelPoints[above=2pt](B)
\tkzLabelPoints[right=2pt](C)
\tkzLabelSegment[above=2pt](B,C){\textit{3}}
\tkzLabelSegment[above=2pt](A,B){\textit{3}}
\tkzMarkAngle[size=1.5cm,opacity=.4,color=red,line width=3pt](C,A,B)
\tkzMarkAngle[size=1.5cm,opacity=.4,color=red,line width=3pt](B,C,A)
\tkzLabelAngle[size=0.8cm](C,A,B){$x$}
\tkzLabelAngle[size=0.8cm](B,C,A){56\degree}
\end{tikzpicture}
\end{document}

and generates the following triangle

enter image description here

However, another triangle with the following latex

\documentclass{article}
\usepackage{gensymb}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[thick]
\coordinate (A) at (0,0);
\coordinate (B) at (3,7);
\coordinate (C) at (6,3);
\draw (A)--(B)--(C)--cycle;
\tkzLabelPoints[left=2pt](A)
\tkzLabelPoints[above=2pt](B)
\tkzLabelPoints[right=2pt](C)
\tkzLabelSegment[above=2pt](B,C){\textit{3}}
\tkzLabelSegment[above=2pt](A,B){\textit{4}}
\tkzMarkAngle[size=2cm,opacity=.4,color=red,line width=3pt](C,A,B)
\tkzMarkAngle[size=2cm,opacity=.4,color=red,line width=3pt](B,C,A)
\tkzLabelAngle[size=0.8cm](C,A,B){$x$}
\tkzLabelAngle[size=0.8cm](B,C,A){83\degree}
\end{tikzpicture}
\end{document}

looks like this

enter image description here

with the 83 outside of the angle. Is there a way I can force the label to be inside the angle? Why does this happen for seemingly no reason?

  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – dexteritas Aug 01 '17 at 14:17
  • @Schweinebacke fixed. – user6731064 Aug 01 '17 at 14:36
  • See https://tex.stackexchange.com/a/196224/2388. – Ulrike Fischer Aug 01 '17 at 14:47

0 Answers0