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