style.sty
changeset 123 556cd74cbba9
parent 62 2151c77e1e24
child 252 a9d84442fb65
--- a/style.sty	Wed May 31 09:26:08 2017 +0100
+++ b/style.sty	Thu Nov 02 14:47:55 2017 +0000
@@ -1,14 +1,15 @@
 \usepackage{xcolor}
+%%\usepackage{fontspec}
 \usepackage[sc]{mathpazo}
 \usepackage{fontspec}
 \setmainfont[Ligatures=TeX]{Palatino Linotype}
 \usepackage{amssymb}
 \usepackage{amsmath}
-%%\usepackage{menukeys}
-
+\usepackage{menukeys}
 \definecolor{darkblue}{rgb}{0,0,0.6}
 \usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
 
+%%% for regular expressions and values
 \newcommand{\ZERO}{\mbox{\bf 0}}
 \newcommand{\ONE}{\mbox{\bf 1}}
 \newcommand{\Left}{\textit{Left}}
@@ -20,6 +21,30 @@
 %%% for trees
 %% http://anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/forest/forest.pdf
 
+\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{"}}}
@@ -30,3 +55,25 @@
 \def\fnote{\gdef\@thefnmark{}\@footnotetext}
 \makeatother
 
+\newcommand{\HEADER}{{\bf Please submit your solutions via email. Please submit 
+only ASCII text or PDFs. Every solution should be preceeded by the corresponding 
+question text, like:
+
+\begin{center}
+\begin{tabular}{ll}
+Q$n$: & \ldots a difficult question from me\ldots\\
+A:    & \ldots an answer from you \ldots\\
+Q$n+1$ & \ldots another difficult question\ldots\\
+A:     & \ldots another brilliant answer from you\ldots
+\end{tabular}
+\end{center}
+
+\noindent Solutions will only be accepted until 20th December! Please send only
+one homework per email.}\bigskip}
+
+\newcommand{\POSTSCRIPT}{
+{\bf (Optional)} This question is for you to provide 
+regular feedback to me: for example
+what were the most interesting, least interesting, or confusing 
+parts in this lecture? Any problems with my Scala code? Please 
+feel free to share any other questions or concerns.}