I have a diagram that needs some modifications. The mark for the right angle and the label of $\theta$
are not in the right places. The arc indicating $\angle ACB$
is not in the place. The lengths $x$
and $y$
for $\overline{PC}$
and $\overline{PB}$
, respectively, are not in the right places. The line indicating the length of $\overline{BC}$
is shifted rightward from its correct position.
I would like $a + x$
to be typeset in the same direction as the line.
\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\path (60:2.5) coordinate (A) (10:6) coordinate (B) (0:0) coordinate (C);
\draw (A)
-- (B) node [at start, above left]{$A$} node [midway, above]{$c$}
-- (C) node [at start, right]{$B$}
-- (A) node [at start, below]{$C$} node [midway, left]{$b$} -- cycle;
\coordinate (P) at ($(B)!(A)!(C)$);
\draw [dashed] (A) -- (P) node [below]{$P$} node [midway, right]{$h$} -- (C);
C -- node [midway, below]{$x$} -- P -- node [midway, below]{$y$} B;
\draw pic[draw, angle radius=2mm,"$\theta$",angle eccentricity=2] {angle = B--C--A};
\tkzMarkRightAngle(A,P,B);
\draw[|<->|] ($(B)!7mm!90:(C)$)--node[fill=white] {$x + y$} ($(C)!7mm!-90:(B)$);
\end{tikzpicture}
\end{document}
C -- node [midway, below]{$x$} -- P -- node [midway, below]{$y$} B;
. You missed\draw at the start and all nodes should be
(C)` (note parenthesis),(P)
and(B)
.