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/resource-allocation-graph/resource-allocation-graph.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

29 lines
1,010 B
TeX

\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning, calc,lindenmayersystems,decorations.pathmorphing,intersections}
\tikzstyle{resource}= [draw,minimum size=16pt,inner sep=0pt]
\tikzstyle{process} = [draw,minimum size=16pt,inner sep=0pt,circle]
\tikzstyle{allocated} = [->,thick,arrows={-latex}]
\tikzstyle{requested} = [<-,thick,arrows={latex-}, dashed]
\begin{document}
\begin{preview}
\begin{tikzpicture}[scale=2]
\node (r1)[resource] at (0,2) {$R_1$};
\node (r2)[resource] at (1,2) {$R_2$};
\node (r3)[resource] at (2,2) {$R_3$};
\node (p1)[process] at (0,1) {$P_1$};
\node (p2)[process] at (1,1) {$P_2$};
\node (p3)[process] at (2,1) {$P_3$};
\node (r4)[resource] at (0,0) {$R_4$};
\draw[allocated] (r1) -- (p1);
\draw[allocated] (r2) -- (p2);
\draw[allocated] (r3) -- (p2);
\draw[requested] (r3) -- (p3);
\end{tikzpicture}
\end{preview}
\end{document}