2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/vector-triangle-inequality/vector-triangle-inequality.tex
Martin Thoma 7740f0147f Remove trailing spaces
The commands

find . -type f -name '*.md' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

and

find . -type f -name '*.tex' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

were used to do so.
2015-10-14 14:25:34 +02:00

24 lines
851 B
TeX

\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, calc, shapes, arrows}
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
\definecolor{xvectorcolor}{HTML}{77933C}
\begin{document}
\begin{tikzpicture}[font=\boldmath]
\large
% Points
\coordinate (A) at (0,0) {};
\coordinate (B) at (5,0) {};
\coordinate (C) at (2,2) {};
% Draw the triangle
\path[fill=blue!10, fill=blue!5] (A) -- (B) -- (C) -- (A);
\draw[ultra thick, xvectorcolor, arrows={-latex}] (A) -- (C) node[sloped,midway,above=-0.1cm] {$x$};
\draw[ultra thick, blue!80, arrows={-latex}] (C) -- (B) node[sloped,midway,above=-0.1cm] {$y$};
\draw[ultra thick, red!80, arrows={-latex},line cap=round] (A) -- (B) node[sloped,midway,right=-0.3cm,above=-0.1cm] {$x+y$};
\end{tikzpicture}
\end{document}