2

I am trying to draw an angle in this TikZ picture but I just can't figure out how to do it right? I want to draw the angle so it is red and a random value

\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 Answer 1

7

Use \usetkzobj{all} and it is (C,A,B) not (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}

enter image description here

1
  • And you forgot \end{minipage}. But I have removed the minipage as a whole.
    – user11232
    Oct 27, 2015 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .