Slides/langs.sty
changeset 201 2585e2a7a7ab
parent 200 10c096d59218
--- a/Slides/langs.sty	Tue Jun 14 12:24:25 2016 +0100
+++ b/Slides/langs.sty	Tue Jun 14 12:37:46 2016 +0100
@@ -67,3 +67,28 @@
 \makeatother
 
 \lstset{escapeinside={(*@}{@*)}}
+
+
+
+\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]}