aboutsummaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-12-07 14:18:15 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-12-07 14:18:15 +0000
commit01578c223361eabdd3e6ef0ed1822fc4918a4fd1 (patch)
tree798d93cd6e596b013d9c5f6261d06fb669c3b052 /tex
parentc02cf6736a15a47937323d88d278890d3f666a0b (diff)
Better implementation of the make-demo graph, added preamble
Some minor modifications were made in the graph showing the organization of the analysis with Make. Also, a `tex/preamble.tex' was defined to simplify the main source.
Diffstat (limited to 'tex')
-rw-r--r--tex/preamble.tex89
1 files changed, 89 insertions, 0 deletions
diff --git a/tex/preamble.tex b/tex/preamble.tex
new file mode 100644
index 0000000..91466be
--- /dev/null
+++ b/tex/preamble.tex
@@ -0,0 +1,89 @@
+%% For a wider writing width.
+\newcommand\Wider[2][3em]{%
+\makebox[\linewidth][c]{%
+ \begin{minipage}{\dimexpr\textwidth+#1\relax}
+ \raggedright#2
+ \end{minipage}%
+ }%
+}
+
+%% TiKZ
+\usepackage{tikz}
+\usetikzlibrary{graphs}
+\usetikzlibrary{positioning}
+\tikzset{ bbox/.style={
+ rectangle,
+ minimum width=2.5cm,
+ rounded corners=2mm,
+ very thick,draw=black!50,
+ top color=white,
+ bottom color=black!20 } }
+
+\tikzset{ rbox/.style={
+ rectangle,
+ dotted,
+ minimum width=2.5cm,
+ rounded corners=2mm,
+ very thick,draw=red!50!black!50,
+ top color=white,
+ bottom color=red!50!black!20 } }
+
+\tikzset{ gbox/.style={
+ rectangle,
+ minimum width=2.5cm,
+ very thick,
+ draw=green!50!black!50,
+ top color=white,
+ bottom color=green!50!black!20 } }
+
+%% For the make demo
+\newcommand{\makedemoslide}[2] {
+ \begin{frame}{#2}
+ \begin{center}\includegraphics[width=0.8\linewidth]{#1}\end{center}
+ \footnotesize \textcolor{green!50!black}{Green boxes} are \emph{source}
+ files (hand-written), \textcolor{blue}{Blue boxes} are \emph{built}
+ files (automatically generated).
+ \end{frame}
+}
+
+%% Nodes in make-demo graph
+\tikzset{node-terminal/.style={
+ rectangle,
+ very thick,
+ draw=blue!50,
+ text centered,
+ top color=white,
+ minimum size=6mm,
+ text width=2.1cm,
+ rounded corners=3mm,
+ bottom color=blue!20,
+ font=\ttfamily}}
+
+\tikzset{node-nonterminal/.style={
+ rectangle,
+ very thick,
+ text centered,
+ top color=white,
+ text width=2.1cm,
+ minimum size=6mm,
+ draw=green!50!black!50,
+ bottom color=green!80!black!50,
+ font=\ttfamily}}
+
+\tikzset{node-makefile/.style={
+ thick,
+ rectangle,
+ anchor=south,
+ minimum width=2.6cm,
+ minimum height=5cm,
+ draw=green!50!black!50,
+ rounded corners=2mm,
+ fill=black!10!green!12!white,
+}}
+
+\tikzset{node-point/.style={
+ circle,
+ black!50,
+ inner sep=0pt,
+ minimum size=0pt,
+ fill=white}}