I'm new to tikz and I am trying to make a perpendicular angle mark on a triangle by
\path[clip](C)--($(B)!(A)!(C)$)--(A);
and
\node[draw=black, rectangle,inner sep=0pt, outer sep=0pt, minimum size=4mm] at ($(B)!(A)!(C)$){};
But I am only getting a bottom of the square on the angle.
I am trying to save the hassle of finding the right angle to rotate for the square. So is there any easier way to draw the right angle mark with rotation?
Below is the code for my shape.
\begin{tikzpicture}
\coordinate[label=-90:$A$] (A) at (0,0);
\coordinate[label=-90:$C$] (C) at (4,0);
\coordinate[label=45:$B$] (B) at (1.25,3);
\draw (A)--(B)--(C)--(A);
\draw ($(A)!(B)!(C)$)--(B);
\draw ($(B)!(A)!(C)$)--(A);
\draw ($(A)!(C)!(B)$)--(C);
\begin{scope}
\path[clip](B)--($(A)!(B)!(C)$)--(C);
\node [draw=black, rectangle,minimum size=4mm,inner sep=0pt,outer sep=0pt] at ($(A)!(B)!(C)$) {};
\end{scope}
\path[clip](C)--($(B)!(A)!(C)$)--(A);
\node[draw=black, rectangle,inner sep=0pt, outer sep=0pt, minimum size=4mm] at ($(B)!(A)!(C)$){};
\begin{scope}
\end{scope}
\begin{scope}
\end{scope}
\end{tikzpicture}
thank you for your help.
\documentclass{...}
and ending with\end{document}
.