style.sty
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Wed, 18 Nov 2015 01:53:01 +0000
changeset 380 1e88390e81aa
parent 347 22b5294daa2a
child 394 2f9fe225ecc8
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}
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
\usepackage{fontspec}
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
327
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    12
%%% for trees
9470cd124667 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 295
diff changeset
    13
%% 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
    14
239
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    15
\newcommand\grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    16
\begin{tikzpicture}[baseline=(char.base)]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    17
  \path[use as bounding box]
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    18
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    19
  \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
    20
    (0,0) rectangle (1em,1em);
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    21
  \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
    22
    (char) at (0em,\gridraiseamount) {#1};
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    23
\end{tikzpicture}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    24
\newcommand\gridraiseamount{0.12em}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    25
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    26
\makeatletter
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    27
\newcommand\Grid[1]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    28
  \@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
    29
\makeatother	
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    30
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    31
\newcommand\Vspace[1][.3em]{%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    32
  \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
    33
  \vbox{\hrule width#1}%
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    34
  \hbox{\vrule height.3ex}}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    35
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    36
\def\VS{\Vspace[0.6em]}
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    37
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    38
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    39
\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
    40
\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
    41
\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
    42
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
\definecolor{codegray}{gray}{0.9}
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    44
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    45
\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
    46
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
    47
question, like:
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    48
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    49
\begin{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    50
\begin{tabular}{ll}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    51
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
    52
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
    53
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
    54
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
    55
\end{tabular}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    56
\end{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    57
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    58
\noindent Solutions will only be accepted until 30th December!}\bigskip}