我试过
\documentclass[border=0.5cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[line join = round, line cap = round;]
\path
(0,0) coordinate (A)
(3,0) coordinate (B)
(0,2) coordinate (C)
;
\draw (A) -- (B) -- (C) -- cycle
(B) --(5,0) ;
\foreach \p/\g in {A/-90,B/-90,C/90}
\path (\p)+(\g:2.5mm) node{$\p$};
\end{tikzpicture}
\end{document}
并得到
答案1
您可以旋转\draw
添加选项:
\documentclass[tikz,border=0.5cm]{standalone}
\begin{document}
\begin{tikzpicture}[line join = round, line cap = round;]
\path (0,0) coordinate (A)
(3,0) coordinate (B)
(0,2) coordinate (C);
\draw (5,0) -- (A) node[below] {$A$} -- (C) node[above] {$C$} -- (B) node[below] {$B$};
\draw[rotate={-atan(2/3)},transform shape] (C) rectangle ++ (1,0.8) node[midway] {$m$};
\end{tikzpicture}
\end{document}