Skip to content
Snippets Groups Projects
preamble.tex 2.26 KiB
Newer Older
%%%
% Font and Language
%%%
\usepackage{fontspec}
\setmonofont{Fira Code}[RawFeature={+onum, +ss07}]

\usepackage{polyglossia}
\setdefaultlanguage{german}
\setotherlanguage{english}

%%%
% Styling
%%%
\usepackage[
    % Combine Markdown and LaTeX
    hybrid,
    % Allow pandoc definition lists of the form
    % ⟨Definiendum⟩
    % : ⟨Definiens⟩
    definitionLists,
    fencedCode,
    footnotes,
    % Usage: `note^[footnote]`
    inlineFootnotes,
    % Use `#.` instead of `1.` etc for ordered lists
    hashEnumerators,
    % Add YAML Metadata in the form
    % ---
    % title: 'This is the title'
    % ---
    jekyllData,
    pipeTables,
    % Usage: `: Caption`
    tableCaptions,
    taskLists,
    % Disable _emphasis_, only *emphasis* is allowed
    underscores=false
]{markdown}

\usepackage{xcolor}
\usepackage{listings}
\lstdefinelanguage{Rust}{%
    sensitive,%
    alsoletter={!},%
    morestring=[b]{"},%
    morecomment=[l]{//},%
    morecomment=[n]{/*}{*/},%
    moredelim=[s][]{\#[}{]},%
    moredelim=[s][]{\#![}{]},%
    morekeywords={as,async,await,break,const,continue,crate,dyn,else,enum,extern,false,fn,for,if,impl,in,let,loop,match,mod,move,mut,pub,ref,return,Self,self,static,struct,super,trait,true,type,union,unsafe,use,where,while},% Current keywords
    morekeywords={abstract,become,box,do,final,macro,override,priv,try,typeof,unsized,virtual,yield},% Reserved
    morekeywords=[2]{bool,i8,i16,i32,i64,i128,isize,u8,u16,u32,u64,u128,usize,f32,f64,bool,char,str},% primitive types
}
\lstdefinestyle{color}{%
    basicstyle={\ttfamily\small},
    identifierstyle=\color{brown!60!black},%
    commentstyle={\color[gray]{0.8}},%
    stringstyle={\color{orange!80!brown}},%
    keywordstyle={\bfseries\color{blue}},%
    keywordstyle=[2]{\color{teal}},%
    numbers=left,%
    numberstyle=\tiny,%
    stepnumber=3,%
    firstnumber=1,%
    columns=flexible%
}
\lstset{style=color}

%%%
% Bibliography and TOC
%%%
\usepackage[style=alphabetic]{biblatex}
\addbibresource{../phd_jasper.bib}
\maxtocdepth{subsection}
\setsecnumdepth{subsection}

%%%
% Helpers
%%%
\usepackage[ngerman]{todonotes}
\setuptodonotes{line}

\usepackage{hyperref}
\hypersetup{%
    colorlinks=true,%
    linkcolor=.%
}

%%%
% Math
%%%
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{unicode-math}