![在直角三角形上做直角标记?](https://linux22.com/image/427834/%E5%9C%A8%E7%9B%B4%E8%A7%92%E4%B8%89%E8%A7%92%E5%BD%A2%E4%B8%8A%E5%81%9A%E7%9B%B4%E8%A7%92%E6%A0%87%E8%AE%B0%EF%BC%9F.png)
如何在 B 处添加“直角符号”?
\documentclass[12pt]{book}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% Draw the triangle
\draw[fill=gray!10] (1, 0) coordinate (A)
-- node[left] {} (0,2) coordinate (C)
-- node[above right] {} (6,2) coordinate (B)
-- node[below] {} (1, 0);
%The right-angle mark at C is drawn.
% Draw nodes
\node at (A)[anchor=north] {$B$};
\node at (B)[anchor=north] {$C$};
\node at (C)[anchor=south] {$A$};
\end{tikzpicture}
\end{document}
答案1
这是我根据答案做的这里
\documentclass[12pt]{book}
\usepackage{tikz}
\newcommand*{\rechterWinkel}[3]{% #1 = point, #2 = start angle, #3 = radius
\draw[shift={(#2:#3)}] (#1) arc[start angle=#2, delta angle=90, radius = #3];
\fill[shift={(#2+45:#3/2)}] (#1) circle[radius=1.25\pgflinewidth];
}
\begin{document}
\begin{tikzpicture}
% Draw the triangle
\draw[fill=gray!10] (1, 0) coordinate (A)
-- node[left] {} (0,2) coordinate (C)
-- node[above right] {} (6,2) coordinate (B)
-- node[below] {} (1, 0);
%The right-angle mark at C is drawn.
% Draw nodes
\node at (A)[anchor=north] {$B$};
\node at (B)[anchor=north] {$C$};
\node at (C)[anchor=south] {$A$};
\rechterWinkel{0.85,0.04}{15}{.5}
\end{tikzpicture}
\end{document}