标记三角形中的一个角

标记三角形中的一个角

我想$\angle ACB$用圆弧和$\theta$圆弧外面来标记。

\documentclass[10pt]{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools,array}
\usepackage{tkz-euclide} % loads TikZ and tkzMarkRightAngle needs euclide
\usetikzlibrary{calc,positioning,intersections,quotes,decorations.markings}
\begin{document}
    \begin{tikzpicture}
    \path (110:4.5) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);
    \draw (A)
      -- (B) node [at start, above left] {$A$} node [midway, right] {$c$}
      -- (C) node [at start, right]      {$B$} node [midway, below] {$a$}
      -- (A) node [at start, below]      {$C$} node [midway, left]  {$b$}
      -- cycle;
    \coordinate (P) at ($(B)!(A)!(C)$);
    \draw [dashed] (A) -- (P) node [below, left]{$P$} node [midway, left]{$h$} -- (C);
    \tkzMarkRightAngle(A,P,B);
    \tkzMarkAngle[size=0.25cm,color=cyan](B,C,A)
    \end{tikzpicture}
\end{document}

答案1

似乎你把tkz-euclide命令和混合在一起了tikz。按照同样的方法,你可以添加

\tkzLabelAngle[pos = 0.5](B,C,A){$\theta$}

到您的代码。

\documentclass[10pt]{amsart}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools,array}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{calc,positioning,intersections,quotes,decorations.markings}
\begin{document}
    \begin{tikzpicture}
    \path (110:4.5) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);
    \draw (A)
      -- (B) node [at start, above left] {$A$} node [midway, right] {$c$}
      -- (C) node [at start, right]      {$B$} node [midway, below] {$a$}
      -- (A) node [at start, below]      {$C$} node [midway, left]  {$b$}
      -- cycle;
    \coordinate (P) at ($(B)!(A)!(C)$);
    \draw [dashed] (A) -- (P) node [below, left]{$P$} node [midway, left]{$h$} -- (C);
    \tkzMarkRightAngle(A,P,B)
    \tkzMarkAngle[size=0.25cm,color=cyan](B,C,A)
    \tkzLabelAngle[pos = 0.5](B,C,A){$\theta$}
    \end{tikzpicture}
\end{document}

在此处输入图片描述

仅有tikz(没有 tkz-euclide`)。

\documentclass[10pt]{amsart}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools,array}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,intersections,quotes,decorations.markings,angles}
\begin{document}
    \begin{tikzpicture}
    \path (110:4.5) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);
    \draw (A)
      -- (B) node [at start, above left] {$A$} node [midway, right] {$c$}
      -- (C) node [at start, right]      {$B$} node [midway, below] {$a$}
      -- (A) node [at start, below]      {$C$} node [midway, left]  {$b$}
      -- cycle;
    \coordinate (P) at ($(B)!(A)!(C)$);
    \draw [dashed] (A) -- (P) node [below, left]{$P$} node [midway, left]{$h$} -- (C);
    \draw pic [draw=red,fill=blue!20,angle radius=4mm,"$\theta$",angle eccentricity=1.5] {angle = B--C--A};
    \coordinate[above right = 1.5mm and 5mm of P] (p);
    \draw (p) -- ($(P)!(p)!(A)$);
    \draw (p) -- ($(P)!(p)!(C)$);
    \end{tikzpicture}
\end{document}

在此处输入图片描述

仅使用tkz-euclide

\documentclass[10pt]{amsart}
\usepackage{tkz-euclide}
\usetkzobj{all}


\begin{document}

\begin{tikzpicture}

\tkzDefPoint(0:0){C}
\tkzDefPoint(-30:3){B}
\tkzDefPoint(110:4.5){A}



\tkzLabelPoint[left](A){$A$}
\tkzLabelPoint[right](B){$B$}
\tkzLabelPoint[below](C){$C$}

\tkzDrawSegment[black](A,C)
\tkzDrawSegment[black](C,B)
\tkzDrawSegment[black](A,B)

\tkzDrawAltitude[dashed,color=black](C,B)(A)
\tkzGetPoint{P}
\tkzLabelPoint[below](P){$P$}
\tkzDrawSegment[dashed,color=black](C,P)

\tkzLabelSegment[auto,swap](B,A){$c$}
\tkzLabelSegment[auto](B,C){$a$}
\tkzLabelSegment[auto](C,A){$b$}
\tkzLabelSegment[auto](P,A){$h$}

\tkzMarkRightAngle[color=green!60!red](A,P,B)
\tkzMarkAngle[size=0.25cm,color=cyan](B,C,A)
\tkzLabelAngle[pos = 0.5](B,C,A){$\theta$}
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容