%This document can be run standalone if few comments %are removed. This is useful to check and modify the drawing. % %\documentclass{article} %\usepackage{calc} %\usepackage{tikz} %\usetikzlibrary{arrows,decorations.markings} %\begin{document} %length of the base of triangle. %\newlength{\trianglebase} %and its height %\newlength{\triangleheight} %Length of the mark for the right angle %\newlength{\ranglesizeB} % \setlength{\trianglebase}{2cm} \setlength{\triangleheight}{1.5cm} \setlength{\ranglesizeB}{0.15cm} \savebox\TriangleBox{% \begin{tikzpicture} %Coordinates of the triangle \coordinate (A) at (0,0); \coordinate (B) at (\trianglebase,0); \coordinate (C) at (.167\trianglebase,\triangleheight); \coordinate (HeightBase) at (.167\trianglebase,0); % %Triangle with origin in (0,0) and a height of \triangleheight %arriving at point "HeightBase". \draw [thick] (A) -- (C) node[midway,left] {$b$} -- (B) node[midway,above] {$a$} -- cycle node[midway,below] {$c$}; %Draw the height \draw (HeightBase) -- (C) node[midway,right]{$h$}; %Draw the right angle symbol \draw (HeightBase) -- ++ (0, \ranglesizeB) -- ++ (\ranglesizeB, 0) -- ++(0,-\ranglesizeB) -- cycle; %Put a letter for the angle. \draw (A) node[below,left]{$A$}; \draw (B) node[below,right]{$B$}; \draw (C) node[above]{$C$}; \end{tikzpicture} } %\end{document}