style.sty
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 04 Oct 2016 14:54:20 +0100
changeset 442 84d6714840c9
parent 438 84608b4b3578
child 461 890188804fb4
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}}
433
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    16
\newcommand{\Der}{\textit{Der}}
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    17
\newcommand{\der}{\textit{der}}
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    18
\newcommand{\Ders}{\textit{Ders}}
c08290ee4f1f updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 416
diff changeset
    19
\newcommand{\ders}{\textit{ders}}
398
c8ce95067c1a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 395
diff changeset
    20
327
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    21
%%% for trees
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    22
%% 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
    23
239
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    24
\newcommand\grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    25
\begin{tikzpicture}[baseline=(char.base)]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    26
  \path[use as bounding box]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    27
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    28
  \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
    29
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    30
  \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
    31
    (char) at (0em,\gridraiseamount) {#1};
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    32
\end{tikzpicture}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    33
\newcommand\gridraiseamount{0.12em}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    34
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    35
\makeatletter
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    36
\newcommand\Grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    37
  \@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
    38
\makeatother	
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    39
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    40
\newcommand\Vspace[1][.3em]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    41
  \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
    42
  \vbox{\hrule width#1}%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    43
  \hbox{\vrule height.3ex}}
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
\def\VS{\Vspace[0.6em]}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    46
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    47
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    48
\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
    49
\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
    50
\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
    51
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
\definecolor{codegray}{gray}{0.9}
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    53
395
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    54
\makeatletter
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    55
\def\fnote{\gdef\@thefnmark{}\@footnotetext}
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    56
\makeatother
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    57
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    58
\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
    59
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
    60
question, like:
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    61
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    62
\begin{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    63
\begin{tabular}{ll}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    64
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
    65
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
    66
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
    67
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
    68
\end{tabular}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    69
\end{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    70
438
84608b4b3578 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 433
diff changeset
    71
\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
    72
one homework per email.}\bigskip}
403
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    73
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    74
\newcommand{\POSTSCRIPT}{
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    75
{\bf (Optional)} This question is for you to provide 
416
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    76
regular feedback to me: for example
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    77
what were the most interesting, least interesting, or confusing 
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    78
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
    79
feel free to share any other questions or concerns.}