style.sty
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 04 Oct 2020 22:20:25 +0100
changeset 772 3bf3f5bb067e
parent 766 e8402d8ec8e6
child 780 f3521c0e37b9
permissions -rw-r--r--
update
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}
618
f4818c95a32e updated
Christian Urban <urbanc@in.tum.de>
parents: 461
diff changeset
    11
\usepackage{soul}
743
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    12
\usepackage{marginnote}
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    13
\usepackage{fontawesome5}
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
400
e4afe3f46c29 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 399
diff changeset
    15
%%% for regular expressions and values
398
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    16
\newcommand{\ZERO}{\mbox{\bf 0}}
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    17
\newcommand{\ONE}{\mbox{\bf 1}}
400
e4afe3f46c29 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 399
diff changeset
    18
\newcommand{\Left}{\textit{Left}}
669
2f5a4d76756d updated
Christian Urban <urbanc@in.tum.de>
parents: 618
diff changeset
    19
\newcommand{\Right}{\textit{Right}}
433
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    20
\newcommand{\Der}{\textit{Der}}
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    21
\newcommand{\der}{\textit{der}}
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    22
\newcommand{\Ders}{\textit{Ders}}
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    23
\newcommand{\ders}{\textit{ders}}
669
2f5a4d76756d updated
Christian Urban <urbanc@in.tum.de>
parents: 618
diff changeset
    24
\newcommand{\inj}{\textit{inj}}
2f5a4d76756d updated
Christian Urban <urbanc@in.tum.de>
parents: 618
diff changeset
    25
\newcommand{\nullable}{\textit{nullable}}
398
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    26
327
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    27
%%% for trees
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    28
%% 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
    29
239
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    30
\newcommand\grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    31
\begin{tikzpicture}[baseline=(char.base)]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    32
  \path[use as bounding box]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    33
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    34
  \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
    35
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    36
  \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
    37
    (char) at (0em,\gridraiseamount) {#1};
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    38
\end{tikzpicture}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    39
\newcommand\gridraiseamount{0.12em}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    40
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    41
\makeatletter
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    42
\newcommand\Grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    43
  \@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
    44
\makeatother	
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    45
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    46
\newcommand\Vspace[1][.3em]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    47
  \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
    48
  \vbox{\hrule width#1}%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    49
  \hbox{\vrule height.3ex}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    50
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    51
\def\VS{\Vspace[0.6em]}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    52
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    53
743
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    54
%%% url pointers
756
f7c7a75e0583 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 754
diff changeset
    55
\newcommand{\hv}[1]{\href{#1}{\faFilm}}
754
1c9a23304b85 ammonite
Christian Urban <christian.urban@kcl.ac.uk>
parents: 751
diff changeset
    56
\newcommand{\hr}[1]{\href{#1}{\faHandPointRight[regular]}}
743
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    57
\newcommand{\here}[1]{\marginnote{\href{#1}{\faHandPointRight[regular]}}}
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    58
\newcommand{\video}[1]{\marginnote{\href{#1}{\faFilm}}}
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    59
\newcommand{\alert}{\reversemarginpar\marginpar{\mbox{}\hfill\textcolor{red}{\faExclamationTriangle}}}
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    60
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    61
239
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    62
\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
    63
\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
    64
\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
    65
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
\definecolor{codegray}{gray}{0.9}
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    67
395
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    68
\makeatletter
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    69
\def\fnote{\gdef\@thefnmark{}\@footnotetext}
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    70
\makeatother
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    71
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    72
\newcommand{\HEADER}{{\bf Please submit your solutions via email. Please submit 
743
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    73
only PDFs! Every solution should be preceeded by the corresponding 
461
890188804fb4 updated
Christian Urban <urbanc@in.tum.de>
parents: 438
diff changeset
    74
question text, like:
347
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    75
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    76
\begin{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    77
\begin{tabular}{ll}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    78
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
    79
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
    80
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
    81
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
    82
\end{tabular}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    83
\end{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    84
438
84608b4b3578 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 433
diff changeset
    85
\noindent Solutions will only be accepted until 20th December! Please send only
394
2f9fe225ecc8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 347
diff changeset
    86
one homework per email.}\bigskip}
403
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    87
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    88
\newcommand{\POSTSCRIPT}{
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    89
{\bf (Optional)} This question is for you to provide 
416
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    90
regular feedback to me: for example
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    91
what were the most interesting, least interesting, or confusing 
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    92
parts in this lecture? Any problems with my Scala code? Please 
618
f4818c95a32e updated
Christian Urban <urbanc@in.tum.de>
parents: 461
diff changeset
    93
feel free to share any other questions or concerns. Also, all my
f4818c95a32e updated
Christian Urban <urbanc@in.tum.de>
parents: 461
diff changeset
    94
material is \st{crap} imperfect. If you have any suggestions for
743
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    95
improvement, I am very grateful to hear.\medskip
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    96
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    97
If *you* want to share anything (code, videos, links), you are
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    98
encouraged to do so. Just drop me an email.} 
719
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
    99
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
   100
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
   101
% CW deadlines
766
e8402d8ec8e6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 756
diff changeset
   102
\def\cwONE{16 October}
e8402d8ec8e6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 756
diff changeset
   103
\def\cwTWO{23 November}
e8402d8ec8e6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 756
diff changeset
   104
\def\cwTHREE{20 November}
719
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
   105
\def\cwFOUR{11 December}
751
4b208d81e002 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 743
diff changeset
   106
\def\cwFIVE{15 January}
719
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
   107
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
   108
\def\cwISABELLE{11 December}