style.sty
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 10 Sep 2023 12:24:55 +0100
changeset 917 89e05a230d2d
parent 915 f2e667bed1c8
child 922 e86ea06e3b25
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}
798
aaf0bd0a211d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 780
diff changeset
     8
%\usepackage{menukeys}
236
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
295
19f23c4c2167 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 239
diff changeset
    27
239
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    28
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    29
743
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    30
%%% url pointers
756
f7c7a75e0583 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 754
diff changeset
    31
\newcommand{\hv}[1]{\href{#1}{\faFilm}}
754
1c9a23304b85 ammonite
Christian Urban <christian.urban@kcl.ac.uk>
parents: 751
diff changeset
    32
\newcommand{\hr}[1]{\href{#1}{\faHandPointRight[regular]}}
743
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    33
\newcommand{\here}[1]{\marginnote{\href{#1}{\faHandPointRight[regular]}}}
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    34
\newcommand{\video}[1]{\marginnote{\href{#1}{\faFilm}}}
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    35
\newcommand{\alert}{\reversemarginpar\marginpar{\mbox{}\hfill\textcolor{red}{\faExclamationTriangle}}}
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    36
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    37
239
68d98140b90b added notation handout
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 236
diff changeset
    38
\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
    39
\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
    40
\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
    41
236
34e901c529ce farmed out style files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
\definecolor{codegray}{gray}{0.9}
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    43
395
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    44
\makeatletter
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    45
\def\fnote{\gdef\@thefnmark{}\@footnotetext}
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    46
\makeatother
e57d3d92b856 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 394
diff changeset
    47
908
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    48
%% a line after figures
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    49
\usepackage{caption}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    50
\DeclareCaptionFormat{custom}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    51
{%
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    52
  \textbf{#1#2}#3
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    53
  \raisebox{0.5em}{\rule{\textwidth}{0.1mm}}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    54
}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    55
\captionsetup{format=custom}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    56
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    57
%\usepackage{float}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    58
%\newcommand{\topfigrule}{\vspace*{1pt}\noindent\rule{\columnwidth}{0.4pt}\vspace{2.6pt}}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    59
%\newcommand{\dblfigrule}{\vspace*{1pt}\noindent\rule{\columnwidth}{0.4pt}\vspace{2.6pt}}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    60
%\newcommand{\botfigrule}{\vspace*{1pt}\noindent\rule{\columnwidth}{0.4pt}\vspace{2.6pt}}
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    61
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    62
0138618eff73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 876
diff changeset
    63
331
a2c18456c6b7 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 327
diff changeset
    64
\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
    65
only PDFs! Every solution should be preceeded by the corresponding 
461
890188804fb4 updated
Christian Urban <urbanc@in.tum.de>
parents: 438
diff changeset
    66
question text, like:
347
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    67
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    68
\begin{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    69
\begin{tabular}{ll}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    70
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
    71
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
    72
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
    73
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
    74
\end{tabular}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    75
\end{center}
22b5294daa2a updated hws
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 331
diff changeset
    76
438
84608b4b3578 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 433
diff changeset
    77
\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
    78
one homework per email.}\bigskip}
403
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    79
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    80
\newcommand{\POSTSCRIPT}{
564f7584eff1 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    81
{\bf (Optional)} This question is for you to provide 
416
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    82
regular feedback to me: for example
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    83
what were the most interesting, least interesting, or confusing 
357c395ae838 updated
Christian Urban <urbanc@in.tum.de>
parents: 403
diff changeset
    84
parts in this lecture? Any problems with my Scala code? Please 
618
f4818c95a32e updated
Christian Urban <urbanc@in.tum.de>
parents: 461
diff changeset
    85
feel free to share any other questions or concerns. Also, all my
f4818c95a32e updated
Christian Urban <urbanc@in.tum.de>
parents: 461
diff changeset
    86
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
    87
improvement, I am very grateful to hear.\medskip
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    88
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    89
If *you* want to share anything (code, videos, links), you are
6acabeecdf75 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 719
diff changeset
    90
encouraged to do so. Just drop me an email.} 
719
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
    91
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
    92
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
    93
% CW deadlines
915
f2e667bed1c8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 908
diff changeset
    94
\def\cwONE{16 October}
f2e667bed1c8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 908
diff changeset
    95
\def\cwTWO{10 November}  
f2e667bed1c8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 908
diff changeset
    96
\def\cwTHREE{27 November} 
f2e667bed1c8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 908
diff changeset
    97
\def\cwFOUR{14 December}
f2e667bed1c8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 908
diff changeset
    98
\def\cwFIVE{12 January}
719
0de3527e6ae3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 669
diff changeset
    99
876
771396fa6cc4 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 867
diff changeset
   100
%%\def\cwISABELLE{11 December}
917
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   101
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   102
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   103
%%%%%%%%%%%%%%
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   104
%% lualatex testing commandline arguments
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   105
\newcommand{\luaif}[1]{\ifnum1=\directlua{if #1 then tex.sprint(1) else tex.sprint(0) end} }
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   106
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   107
\luaif{arg[2] == "sol"}
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   108
\newcommand{\solution}[1]{%
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   109
  \begin{quote}\sf%
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   110
    #1%
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   111
  \end{quote}} \else
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   112
\newcommand{\solution}[1]{}
89e05a230d2d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 915
diff changeset
   113
\fi