我正在尝试在这张 TikZ 图片中绘制一个角度,但我不知道该怎么做?我想绘制一个红色的角度和一个随机值
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{fullpage}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\usepackage{tkz-euclide}
%opening
\title{Formelsamling}
\author{Daniel}
\begin{document}
\subsubsection{Cosinus, sinus og tangens}
\noindent\begin{minipage}[c]{0.5\textwidth}
\begin{tikzpicture}[scale=1.25]%,cap=round,>=latex]
\coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
\coordinate [label=right:$C$] (C) at (1.5cm,-1.0cm);
\coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
\draw (A) -- node[sloped,above] {$Hypotonusen\ c=\num{2.0}$} (B) -- node[right] {$Hosliggende \ a=\num{1.5}$} (C) -- node[below] {$Modstende\ b=\num{1,8}$} (A);
\draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);
\tkzMarkAngle[fill= orange,size=0.8cm,%
opacity=.4](B,A,O)
\tkzLabelAngle[pos = 0.6](B,A,O){$\alpha$}
\end{tikzpicture}
\end{document}
答案1
使用,\usetkzobj{all}
但不是(C,A,B)
。(B,A,O)
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{fullpage}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\usepackage{tkz-euclide}
\usetkzobj{all}
%opening
\title{Formelsamling}
\author{Daniel}
\begin{document}
\subsubsection{Cosinus, sinus og tangens}
\begin{tikzpicture}[scale=1.25]%,cap=round,>=latex]
\coordinate [label=left:$A$] (A) at (-1.5cm,-1.cm);
\coordinate [label=right:$C$] (C) at (1.5cm,-1.0cm);
\coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
\draw (A) -- node[sloped,above] {Hypotonusen $c=\num{2.0}$} (B) -- node[right] {Hosliggende $ a=\num{1.5}$} (C) -- node[below] {Modstende $b=\num{1,8}$} (A);
\draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);
\tkzMarkAngle[fill= orange,size=0.8cm,opacity=.4](C,A,B)
\tkzLabelAngle[pos = 0.6](C,A,B){$\alpha$}
\end{tikzpicture}
\end{document}