style.sty
changeset 239 68d98140b90b
parent 236 34e901c529ce
child 295 19f23c4c2167
--- a/style.sty	Wed Sep 03 14:57:43 2014 +0100
+++ b/style.sty	Sat Sep 06 15:28:59 2014 +0100
@@ -9,5 +9,32 @@
 \definecolor{darkblue}{rgb}{0,0,0.6}
 \usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
 
-\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
+\newcommand\grid[1]{%
+\begin{tikzpicture}[baseline=(char.base)]
+  \path[use as bounding box]
+    (0,0) rectangle (1em,1em);
+  \draw[red!50, fill=red!20]
+    (0,0) rectangle (1em,1em);
+  \node[inner sep=1pt,anchor=base west]
+    (char) at (0em,\gridraiseamount) {#1};
+\end{tikzpicture}}
+\newcommand\gridraiseamount{0.12em}
+
+\makeatletter
+\newcommand\Grid[1]{%
+  \@tfor\z:=#1\do{\grid{\z}}}
+\makeatother	
+
+\newcommand\Vspace[1][.3em]{%
+  \mbox{\kern.06em\vrule height.3ex}%
+  \vbox{\hrule width#1}%
+  \hbox{\vrule height.3ex}}
+
+\def\VS{\Vspace[0.6em]}
+
+
+\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}
+\newcommand{\defn}[1]{\textit{\textbf{#1}}}
+\newcommand{\dq}[1]{\mbox{\tt{"}}#1\mbox{\tt{"}}}
+
 \definecolor{codegray}{gray}{0.9}