style.sty
author Christian Urban <christian.urban@kcl.ac.uk>
Wed, 08 Oct 2025 10:42:10 +0100
changeset 1003 bae8c3eb51c7
parent 989 aa976b429904
permissions -rw-r--r--
updated

\usepackage{xcolor}
%%\usepackage{fontspec}
\usepackage[sc]{mathpazo}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Palatino Linotype}
\usepackage{amssymb}
\usepackage{amsmath}
%\usepackage{menukeys}
\definecolor{darkblue}{rgb}{0,0,0.6}
\usepackage[colorlinks=true,urlcolor=darkblue,linkcolor=darkblue]{hyperref}
\usepackage{soul}
\usepackage{marginnote}
\usepackage{fontawesome5}

%%% for regular expressions and values
\newcommand{\ZERO}{\mbox{\bf 0}}
\newcommand{\ONE}{\mbox{\bf 1}}
\newcommand{\Left}{\textit{Left}}
\newcommand{\Right}{\textit{Right}}
\newcommand{\Der}{\textit{Der}}
\newcommand{\der}{\textit{der}}
\newcommand{\Ders}{\textit{Ders}}
\newcommand{\ders}{\textit{ders}}
\newcommand{\inj}{\textit{inj}}
\newcommand{\nullable}{\textit{nullable}}




%%% url pointers
\newcommand{\hv}[1]{\href{#1}{\faFilm}}
\newcommand{\hr}[1]{\href{#1}{\faHandPointRight[regular]}}
\newcommand{\here}[1]{\marginnote{\href{#1}{\faHandPointRight[regular]}}}
\newcommand{\video}[1]{\marginnote{\href{#1}{\faFilm}}}
\newcommand{\alert}{\reversemarginpar\marginpar{\mbox{}\hfill\textcolor{red}{\faExclamationTriangle}}}


\newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}
\newcommand{\defn}[1]{\textit{\textbf{#1}}}
\newcommand{\dq}[1]{\mbox{\tt{"}}#1\mbox{\tt{"}}}

\definecolor{codegray}{gray}{0.9}

\makeatletter
\def\fnote{\gdef\@thefnmark{}\@footnotetext}
\makeatother

%% a line after figures
\usepackage{caption}
\DeclareCaptionFormat{custom}
{%
  \textbf{#1#2}#3
  \raisebox{0.5em}{\rule{\textwidth}{0.1mm}}
}
\captionsetup{format=custom}

%\usepackage{float}
%\newcommand{\topfigrule}{\vspace*{1pt}\noindent\rule{\columnwidth}{0.4pt}\vspace{2.6pt}}
%\newcommand{\dblfigrule}{\vspace*{1pt}\noindent\rule{\columnwidth}{0.4pt}\vspace{2.6pt}}
%\newcommand{\botfigrule}{\vspace*{1pt}\noindent\rule{\columnwidth}{0.4pt}\vspace{2.6pt}}



\newcommand{\HEADER}{{\bf Please submit your solutions via email. Please submit 
only PDFs! Every solution should be preceeded by the corresponding 
question text, like:

\begin{center}
\begin{tabular}{ll}
Q$n$: & \ldots a difficult question from me\ldots\\
A:    & \ldots an answer from you \ldots\\
Q$n+1$ & \ldots another difficult question\ldots\\
A:     & \ldots another brilliant answer from you\ldots
\end{tabular}
\end{center}

\noindent Solutions will only be accepted until 20th December! Please send only
one homework per email.}\bigskip}

\newcommand{\POSTSCRIPT}{
{\bf (Optional)} This question is for you to provide 
regular feedback to me: for example
what were the most interesting, least interesting, or confusing 
parts in this lecture? Any problems with my Scala code? Please 
feel free to share any other questions or concerns. Also, all my
material is \st{crap} imperfect. If you have any suggestions for
improvement, I am very grateful to hear.\medskip

If *you* want to share anything (code, videos, links), you are
encouraged to do so. Just drop me an email or send a message to the Forum.} 


% CW deadlines
%\def\cwONE{16 October}
%\def\cwTWO{10 November}  
%\def\cwTHREE{27 November} 
%\def\cwFOUR{14 December}
%\def\cwFIVE{12 January}

%\def\cwONE{2nd January}
%\def\cwTWO{2nd January}  
%\def\cwTHREE{2nd January} 
%\def\cwFOUR{2nd January}
%\def\cwFIVE{2nd January}

\def\cwONE{5th January}
\def\cwTWO{5th January}  
\def\cwTHREE{5th January} 
\def\cwFOUR{5th January}
\def\cwFIVE{5th January}

%%\def\cwISABELLE{11 December}


%%%%%%%%%%%%%%
%% lualatex testing commandline arguments
\newcommand{\luaif}[1]{\ifnum1=\directlua{if #1 then tex.sprint(1) else tex.sprint(0) end} }

\luaif{arg[2] == "sol"}
\newcommand{\solution}[1]{%
  \begin{quote}\sf%
    #1%
  \end{quote}} \else
\newcommand{\solution}[1]{}
\fi