style.sty
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Sat, 24 Sep 2016 08:31:04 +0100
changeset 428 a47c4227a0c6
parent 416 357c395ae838
child 433 c08290ee4f1f
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\usepackage{xcolor}
399
5c1fbb39c93e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
     2
%%\usepackage{fontspec}
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
\usepackage[sc]{mathpazo}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\usepackage{fontspec}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\setmainfont[Ligatures=TeX]{Palatino Linotype}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage{amssymb}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
\usepackage{amsmath}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
\usepackage{menukeys}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
\definecolor{darkblue}{rgb}{0,0,0.6}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
400
e4afe3f46c29 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 399
diff changeset
    12
%%% for regular expressions and values
398
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    13
\newcommand{\ZERO}{\mbox{\bf 0}}
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    14
\newcommand{\ONE}{\mbox{\bf 1}}
400
e4afe3f46c29 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 399
diff changeset
    15
\newcommand{\Left}{\textit{Left}}
398
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    16
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    17
327
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    18
%%% for trees
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    19
%% http://anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/forest/forest.pdf
295
19f23c4c2167 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 239
diff changeset
    20
239
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    21
\newcommand\grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    22
\begin{tikzpicture}[baseline=(char.base)]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    23
  \path[use as bounding box]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    24
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    25
  \draw[red!50, fill=red!20]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    26
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    27
  \node[inner sep=1pt,anchor=base west]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    28
    (char) at (0em,\gridraiseamount) {#1};
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    29
\end{tikzpicture}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    30
\newcommand\gridraiseamount{0.12em}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    31
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    32
\makeatletter
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    33
\newcommand\Grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    34
  \@tfor\z:=#1\do{\grid{\z}}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    35
\makeatother	
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    36
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    37
\newcommand\Vspace[1][.3em]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    38
  \mbox{\kern.06em\vrule height.3ex}%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    39
  \vbox{\hrule width#1}%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    40
  \hbox{\vrule height.3ex}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    41
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    42
\def\VS{\Vspace[0.6em]}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    43
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    44
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    45
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    46
\newcommand{\defn}[1]{\textit{\textbf{#1}}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    47
\newcommand{\dq}[1]{\mbox{\tt{"}}#1\mbox{\tt{"}}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    48
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
\definecolor{codegray}{gray}{0.9}
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    50
395
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    51
\makeatletter
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    52
\def\fnote{\gdef\@thefnmark{}\@footnotetext}
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    53
\makeatother
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    54
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    55
\newcommand{\HEADER}{{\bf Please submit your solutions via email. Please submit 
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    56
only ASCII text or PDFs. Every solution should be preceeded by the corresponding 
347
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    57
question, like:
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    58
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    59
\begin{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    60
\begin{tabular}{ll}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    61
Q$n$: & \ldots a difficult question from me\ldots\\
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    62
A:    & \ldots an answer from you \ldots\\
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    63
Q$n+1$ & \ldots another difficult question\ldots\\
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    64
A:     & \ldots another brilliant answer from you\ldots
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    65
\end{tabular}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    66
\end{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    67
394
2f9fe225ecc8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 347
diff changeset
    68
\noindent Solutions will only be accepted until 30th December! Please send only
2f9fe225ecc8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 347
diff changeset
    69
one homework per email.}\bigskip}
403
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    70
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    71
\newcommand{\POSTSCRIPT}{
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    72
{\bf (Optional)} This question is for you to provide 
416
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    73
regular feedback to me: for example
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    74
what were the most interesting, least interesting, or confusing 
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    75
parts in this lecture? Any problems with my Scala code? Please 
403
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    76
feel free to share any other questions or concerns.}