| 27 |      1 | \usepackage{xcolor}
 | 
| 123 |      2 | %%\usepackage{fontspec}
 | 
| 27 |      3 | \usepackage[sc]{mathpazo}
 | 
|  |      4 | \usepackage{fontspec}
 | 
|  |      5 | \setmainfont[Ligatures=TeX]{Palatino Linotype}
 | 
|  |      6 | \usepackage{amssymb}
 | 
|  |      7 | \usepackage{amsmath}
 | 
| 123 |      8 | \usepackage{menukeys}
 | 
| 27 |      9 | \definecolor{darkblue}{rgb}{0,0,0.6}
 | 
|  |     10 | \usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
 | 
|  |     11 | 
 | 
| 123 |     12 | %%% for regular expressions and values
 | 
| 62 |     13 | \newcommand{\ZERO}{\mbox{\bf 0}}
 | 
|  |     14 | \newcommand{\ONE}{\mbox{\bf 1}}
 | 
|  |     15 | \newcommand{\Left}{\textit{Left}}
 | 
|  |     16 | \newcommand{\Der}{\textit{Der}}
 | 
|  |     17 | \newcommand{\der}{\textit{der}}
 | 
|  |     18 | \newcommand{\Ders}{\textit{Ders}}
 | 
|  |     19 | \newcommand{\ders}{\textit{ders}}
 | 
|  |     20 | 
 | 
| 27 |     21 | %%% for trees
 | 
|  |     22 | %% http://anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/forest/forest.pdf
 | 
|  |     23 | 
 | 
| 123 |     24 | \newcommand\grid[1]{%
 | 
|  |     25 | \begin{tikzpicture}[baseline=(char.base)]
 | 
|  |     26 |   \path[use as bounding box]
 | 
|  |     27 |     (0,0) rectangle (1em,1em);
 | 
|  |     28 |   \draw[red!50, fill=red!20]
 | 
|  |     29 |     (0,0) rectangle (1em,1em);
 | 
|  |     30 |   \node[inner sep=1pt,anchor=base west]
 | 
|  |     31 |     (char) at (0em,\gridraiseamount) {#1};
 | 
|  |     32 | \end{tikzpicture}}
 | 
|  |     33 | \newcommand\gridraiseamount{0.12em}
 | 
|  |     34 | 
 | 
|  |     35 | \makeatletter
 | 
|  |     36 | \newcommand\Grid[1]{%
 | 
|  |     37 |   \@tfor\z:=#1\do{\grid{\z}}}
 | 
|  |     38 | \makeatother	
 | 
|  |     39 | 
 | 
|  |     40 | \newcommand\Vspace[1][.3em]{%
 | 
|  |     41 |   \mbox{\kern.06em\vrule height.3ex}%
 | 
|  |     42 |   \vbox{\hrule width#1}%
 | 
|  |     43 |   \hbox{\vrule height.3ex}}
 | 
|  |     44 | 
 | 
|  |     45 | \def\VS{\Vspace[0.6em]}
 | 
|  |     46 | 
 | 
|  |     47 | 
 | 
| 27 |     48 | \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}
 | 
|  |     49 | \newcommand{\defn}[1]{\textit{\textbf{#1}}}
 | 
|  |     50 | \newcommand{\dq}[1]{\mbox{\tt{"}}#1\mbox{\tt{"}}}
 | 
|  |     51 | 
 | 
|  |     52 | \definecolor{codegray}{gray}{0.9}
 | 
|  |     53 | 
 | 
|  |     54 | \makeatletter
 | 
|  |     55 | \def\fnote{\gdef\@thefnmark{}\@footnotetext}
 | 
|  |     56 | \makeatother
 | 
|  |     57 | 
 | 
| 123 |     58 | \newcommand{\HEADER}{{\bf Please submit your solutions via email. Please submit 
 | 
|  |     59 | only ASCII text or PDFs. Every solution should be preceeded by the corresponding 
 | 
|  |     60 | question text, like:
 | 
|  |     61 | 
 | 
|  |     62 | \begin{center}
 | 
|  |     63 | \begin{tabular}{ll}
 | 
|  |     64 | Q$n$: & \ldots a difficult question from me\ldots\\
 | 
|  |     65 | A:    & \ldots an answer from you \ldots\\
 | 
|  |     66 | Q$n+1$ & \ldots another difficult question\ldots\\
 | 
|  |     67 | A:     & \ldots another brilliant answer from you\ldots
 | 
|  |     68 | \end{tabular}
 | 
|  |     69 | \end{center}
 | 
|  |     70 | 
 | 
|  |     71 | \noindent Solutions will only be accepted until 20th December! Please send only
 | 
|  |     72 | one homework per email.}\bigskip}
 | 
|  |     73 | 
 | 
|  |     74 | \newcommand{\POSTSCRIPT}{
 | 
|  |     75 | {\bf (Optional)} This question is for you to provide 
 | 
|  |     76 | regular feedback to me: for example
 | 
|  |     77 | what were the most interesting, least interesting, or confusing 
 | 
|  |     78 | parts in this lecture? Any problems with my Scala code? Please 
 | 
|  |     79 | feel free to share any other questions or concerns.} 
 |