2017-08-04 09:43:01 +02:00
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
\ProvidesClass{mimosis}[2017/08/01 Minimal modern thesis class]
|
|
|
|
|
|
|
|
\LoadClass[paper=a4,
|
|
|
|
twoside,
|
|
|
|
pagesize,
|
|
|
|
11pt,
|
|
|
|
DIV=10, % TODO: Make configurable
|
|
|
|
BCOR=10mm, % TODO: Make configurable
|
|
|
|
cleardoublepage=empty,
|
|
|
|
numbers=noenddot,
|
|
|
|
titlepage,
|
|
|
|
toc=bibliography,
|
|
|
|
toc=index,]{scrbook}
|
|
|
|
|
|
|
|
\RequirePackage{ifpdf}
|
|
|
|
\RequirePackage{ifxetex}
|
|
|
|
\RequirePackage{ifluatex}
|
|
|
|
|
|
|
|
\newif\ifxetexorluatex
|
|
|
|
\ifxetex
|
|
|
|
\xetexorluatextrue
|
|
|
|
\else
|
|
|
|
\ifluatex
|
|
|
|
\xetexorluatextrue
|
|
|
|
\else
|
|
|
|
\xetexorluatexfalse
|
|
|
|
\fi
|
|
|
|
\fi
|
|
|
|
|
|
|
|
\ifxetexorluatex
|
|
|
|
\RequirePackage{fontspec}
|
|
|
|
\else
|
|
|
|
\RequirePackage[utf8]{inputenc}
|
|
|
|
\fi
|
|
|
|
|
|
|
|
\usepackage{csquotes}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2017-09-12 11:15:22 +02:00
|
|
|
% Multi-line comments
|
2017-08-04 09:43:01 +02:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2017-09-12 11:15:22 +02:00
|
|
|
\newcommand{\comment}[1]{}
|
2017-08-04 09:43:01 +02:00
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Fonts & colours
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\usepackage{xcolor}
|
|
|
|
|
|
|
|
\definecolor{hd-red} {RGB}{197, 13, 41}
|
|
|
|
\definecolor{hd-brown}{RGB}{ 90, 15, 20}
|
|
|
|
\definecolor{hd-beige}{RGB}{245,240,234}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Graphics
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\usepackage{graphicx}
|
|
|
|
\graphicspath{%
|
|
|
|
{Figures/}
|
|
|
|
{./}
|
|
|
|
}
|
|
|
|
|
|
|
|
% Suppress warnings about page groups in PDFs. This is not justified
|
|
|
|
% in most of the cases. I am pretty sure I am including my images in
|
|
|
|
% the right manner.
|
|
|
|
\begingroup\expandafter\expandafter\expandafter\endgroup
|
|
|
|
\expandafter\ifx\csname pdfsuppresswarningpagegroup\endcsname\relax
|
|
|
|
\else
|
|
|
|
\pdfsuppresswarningpagegroup=1\relax
|
|
|
|
\fi
|
|
|
|
|
|
|
|
\RequirePackage{subcaption}
|
|
|
|
|
|
|
|
% Make sub-references using \subref being typeset with parentheses.
|
|
|
|
% Otherwise, only the counter will be printed.
|
|
|
|
\captionsetup{subrefformat=parens}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Paragraph lists & compact enumerations
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\RequirePackage[%
|
|
|
|
olditem, % Do not modify itemize environments by default
|
|
|
|
oldenum % Do not modify enumerate environments by default
|
|
|
|
]{paralist}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Spacing
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\RequirePackage{setspace}
|
|
|
|
\onehalfspacing
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Tables
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\RequirePackage{booktabs}
|
|
|
|
\RequirePackage{multirow}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Hyperlinks & bookmarks
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\RequirePackage[%
|
|
|
|
colorlinks = true,
|
|
|
|
citecolor = hd-red,
|
|
|
|
linkcolor = hd-red,
|
|
|
|
urlcolor = hd-red,
|
|
|
|
]{hyperref}
|
|
|
|
|
|
|
|
\RequirePackage{bookmark}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Proper typesetting of units
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\RequirePackage[binary-units=true]{siunitx}
|
|
|
|
|
|
|
|
\sisetup{%
|
|
|
|
detect-all = true,
|
|
|
|
detect-family = true,
|
|
|
|
detect-mode = true,
|
|
|
|
detect-shape = true,
|
|
|
|
detect-weight = true,
|
|
|
|
detect-inline-weight = math,
|
|
|
|
}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Mathematics
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\RequirePackage{amsmath}
|
|
|
|
\RequirePackage{amsthm}
|
|
|
|
\RequirePackage{dsfont}
|
|
|
|
|
|
|
|
% Fix the spacing of \left and \right. Use these with the proper bracket
|
|
|
|
% in order to ensure that they scale automatically.
|
|
|
|
\let\originalleft\left
|
|
|
|
\let\originalright\right
|
|
|
|
\renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft}
|
|
|
|
\renewcommand{\right}{\aftergroup\egroup\originalright}
|
|
|
|
|
|
|
|
\DeclareMathOperator*{\argmin} {arg\,min}
|
|
|
|
\DeclareMathOperator {\dist} {dist}
|
|
|
|
\DeclareMathOperator {\im} {im}
|
|
|
|
|
2017-09-12 11:15:22 +02:00
|
|
|
\newcommand{\domain}{\ensuremath{\mathds{D}}}
|
2017-08-04 09:43:01 +02:00
|
|
|
\newcommand{\real} {\ensuremath{\mathds{R}}}
|
|
|
|
|
|
|
|
% Proper differential operators
|
|
|
|
\renewcommand{\d}[1]{\ensuremath{\operatorname{d}\!{#1}}}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Ordinals
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
2017-09-12 11:15:22 +02:00
|
|
|
\newcommand {\st}{\textsuperscript{\textup{st}}\xspace}
|
2017-08-04 09:43:01 +02:00
|
|
|
\newcommand {\rd}{\textsuperscript{\textup{rd}}\xspace}
|
|
|
|
\newcommand {\nd}{\textsuperscript{\textup{nd}}\xspace}
|
|
|
|
\renewcommand{\th}{\textsuperscript{\textup{th}}\xspace}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Penalties
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\clubpenalty = 10000
|
|
|
|
\widowpenalty = 10000
|
|
|
|
\displaywidowpenalty = 10000
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Headers
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\RequirePackage{scrlayer-scrpage}
|
|
|
|
\pagestyle{scrheadings}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Typefaces for sections
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\setkomafont{sectioning}{\normalfont\bfseries}
|
|
|
|
\setkomafont{descriptionlabel}{\normalfont\bfseries}
|
|
|
|
|
|
|
|
\setkomafont{caption}{\small}
|
|
|
|
\setkomafont{captionlabel}{\usekomafont{caption}}
|