我想修改\Angle
标记角度自动旋转的命令(见相应)。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{quotes,angles}
\newcommand{\Angle}[3]
{\draw pic[draw,angle radius=#2,"{\scriptsize #3}",angle eccentricity=1] {angle = #1}}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (5,0);
\coordinate (C) at (45:5);
\draw (B) -- (A) -- (C) -- cycle;
\Angle{B--A--C}{1.5cm}{$\mid$};
\Angle{C--B--A}{1cm}{$\mid\mid$};
\Angle{A--C--B}{0.5cm}{$\mid\mid\mid$};
\end{tikzpicture}
\end{document}
答案1
虽然不是直接的答案,但对于某些事情,人们应该使用更好的工具。这里是tkz-euclide
\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){C}
\tkzDefPoint(5,0){B}
\tkzDefPoint(45:5){A}
\tkzDrawSegment[green!60!black](A,C)
\tkzDrawSegment[green!60!black](C,B)
\tkzDrawSegment[green!60!black](A,B)
\tkzMarkAngle[size=0.5cm,color=cyan,mark=|](B,C,A)
\tkzMarkAngle[size=1cm,color=magenta,mark=||](C,A,B)
\tkzMarkAngle[size=1cm,color=olive,mark=|||](A,B,C)
\end{tikzpicture}
\end{document}