aboutsummaryrefslogtreecommitdiff
path: root/tex/preamble.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/preamble.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}}