我有一个直角三角形 APR,直角在 A 处。为什么直角标记不在 A 处?为什么几个角标记不以三角形的顶点为中心?我从 A 处画出三角形的高。我想将长度标记为 h,代表高度,但我不需要 h 上方和下方的线条。我该怎么做。为什么我在 P 附近印有“h”?!
\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[dot/.style={fill,circle,inner sep=1.5pt},line width=.7pt]
\path
(80:5) node[dot,label=above left:$A$]{} coordinate (A)
(80:7) coordinate (a)
(20:9) coordinate (B)
(20:11) coordinate (b)
(0:0) node[dot,label=below left:$P$]{} coordinate(P)
(-100:1)coordinate (e)
(-160:1)coordinate (f)
($(P)!(A)!(B)$)node[dot,label=below:$Q$]{} coordinate(Q);
\path[name path=kline](f)--(b); % First line for intersection
\path[name path=ARline](A)--($(A)!10cm!90:(P)$); % A line normal to pA at point A in the east direction
\path [name intersections={of = ARline and kline, by=R}];
\draw (A)--(P)--(R)node[dot,label=below:$R$]{}--cycle;
\draw[purple!70!black,dashed] (A)--(Q);
\tkzMarkRightAngle(A,Q,P);
\draw[|<->|] ($(P)!-7mm!90:(Q)$)--node[fill=white,sloped]{$x$} ($(Q)!-7mm!-90:(P)$);
\draw[<->|] ($(Q)!-7mm!90:(R)$)--node[fill=white,sloped]{$y$} ($(R)!-7mm!-90:(Q)$);
\draw ($(Q)!-3mm!90:(A)$)--node[fill=white] {$h$} ($(A)!-3mm!-90:(Q)$);
\tkzMarkAngle[size=1cm,color=cyan,mark=|](P,A,Q);
\tkzMarkAngle[size=1cm,color=cyan,mark=|](A,R,P);
\tkzMarkAngle[size=0.75cm,color=cyan,mark=||](B,P,A);
\tkzMarkAngle[size=0.75cm,color=cyan,mark=||](Q,A,R);
\tkzMarkRightAngle(R,A,P);
\end{tikzpicture}
\end{document}