style.sty
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Thu, 08 Oct 2015 14:04:04 +0100
changeset 401 2d6eb340fd98
parent 385 b7d055cf16e8
child 416 708b80c825af
permissions -rw-r--r--
updated hws
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
156
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\usepackage{xcolor}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
\usepackage{fontspec}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
\usepackage[sc]{mathpazo}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\setmainfont[Ligatures=TeX]{Palatino Linotype}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\usepackage{amssymb}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage{amsmath}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
\usepackage{menukeys}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
\definecolor{darkblue}{rgb}{0,0,0.6}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
\usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
3b831b9dc616 added some initial handouts
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
\definecolor{codegray}{gray}{0.9}
271
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    13
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    14
\newcommand\grid[1]{%
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    15
\begin{tikzpicture}[baseline=(char.base)]
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    16
  \path[use as bounding box]
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    17
    (0,0) rectangle (1em,1em);
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    18
  \draw[red!50, fill=red!20]
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    19
    (0,0) rectangle (1em,1em);
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    20
  \node[inner sep=1pt,anchor=base west]
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    21
    (char) at (0em,\gridraiseamount) {#1};
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    22
\end{tikzpicture}}
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    23
\newcommand\gridraiseamount{0.12em}
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    24
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    25
\makeatletter
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    26
\newcommand\Grid[1]{%
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    27
  \@tfor\z:=#1\do{\grid{\z}}}
4796f424cf12 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 160
diff changeset
    28
\makeatother	
366
34a8f73b2c94 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    29
34a8f73b2c94 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    30
\makeatletter
34a8f73b2c94 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    31
\def\fnote{\gdef\@thefnmark{}\@footnotetext}
34a8f73b2c94 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    32
\makeatother
382
5b943e29b717 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 366
diff changeset
    33
5b943e29b717 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 366
diff changeset
    34
401
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    35
\newcommand{\HEADER}{{\bf Please submit your solutions to the
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    36
email address 7ccsmsen at gmail dot com. Please submit only
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    37
ASCII text or PDFs. Every solution should be preceded by the
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    38
corresponding question, like:
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    39
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    40
\begin{center}
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    41
\begin{tabular}{ll}
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    42
Q$n$: & \ldots a difficult question from me\ldots\\
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    43
A:    & \ldots an answer from you \ldots\\
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    44
Q$n+1$ & \ldots another difficult question\ldots\\
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    45
A:     & \ldots another brilliant answer from you\ldots
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    46
\end{tabular}
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    47
\end{center}
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    48
2d6eb340fd98 updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 385
diff changeset
    49
\noindent Solutions will only be accepted until
382
5b943e29b717 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 366
diff changeset
    50
30th December!}\bigskip}
5b943e29b717 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 366
diff changeset
    51