-
Notifications
You must be signed in to change notification settings - Fork 1
/
beamerpreamble.sty
136 lines (112 loc) · 3.58 KB
/
beamerpreamble.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerpreamble}
%% Fonts
\RequirePackage{fontspec,microtype}
\defaultfontfeatures{Ligatures=TeX}
\RequirePackage{microtype}
%% Localization
\RequirePackage[english]{babel}
%% Text highlighting
\RequirePackage{soul}
%% Glossaries
\RequirePackage[acronym]{glossaries}
%% Math
\RequirePackage{amsmath,amssymb,amstext,bm,upgreek,mathtools}
%% Missing commands
\providecommand{\abs}[1]{\left\lvert#1\right\rvert} % |.|
\providecommand{\br}[1]{\left(#1\right)} % (.)
\providecommand{\sbr}[1]{\left[#1\right]} % [.]
\providecommand{\ddfrac}[2]{\frac{\displaystyle #1}{\displaystyle #2}} % ./.
\newcommand\AR{\text{\itshape\clipbox{0pt 0pt .32em 0pt}\AE\kern-.30emR}} % AR (Aspect ratio)
% \newcommand\AR{\clipbox{0pt 0pt .32em 0pt}\AE\kern-.30emR} % AR (Aspect ratio)
\newcommand\na{{---}} % N/A
\newcommand*\conj[1]{{#1}^*} % Conjugate
\newcommand*\mean[1]{\bar{#1}} % Mean
%% Units
\RequirePackage{siunitx}
% Missing units
\DeclareSIUnit\strain{\hspace{0em}} % Strain
\NewDocumentCommand{\angsi}{omom}{\ang[#1]{#2}\,\si[#3]{#4}} % Redefined \ang with optional unit
%% Listings
\RequirePackage{listings}
% C++ keywords and identifiers
\lstset{
language = [11]C++,
basicstyle = \ttfamily,
keywordstyle = \color{blue},
columns = flexible
% breaklines=true,
% postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}},
% numbers=left,
% numbersep=5pt,
% numberstyle=\tiny\color{gray},
% basicstyle=\footnotesize\ttfamily
}
\lstset{
morekeywords = {[11]
% C++11
final,
override,
% C++20
char8_t,
concept,
co_await,
co_return,
co_yield,
requires
}
}
\lstset{
emph = {[11]
% C++11
final,
override,
% C++20
import,
module
}
}
%% Tables
\RequirePackage{booktabs,multirow,array,tabularx}
%% Captions
\RequirePackage{caption,subcaption}
%% Lists
\RequirePackage{enumitem}
% Color (must precede tikz and algpseudocodex to avoid conflict with different options)
\RequirePackage[dvipsnames]{xcolor}
\definecolor{gray}{HTML}{616161}
\definecolor{gray-dark}{HTML}{373737}
\definecolor{gray-light}{HTML}{fafafa}
\definecolor{orange-dark}{HTML}{ff7043}
\definecolor{orange-light}{HTML}{fbe9e7}
\definecolor{green-dark}{HTML}{66bb6a}
\definecolor{green-light}{HTML}{e8f5e9}
\definecolor{blue-dark}{HTML}{29b6f6}
\definecolor{blue-light}{HTML}{73e8ff}
\definecolor{red-dark}{HTML}{e57373}
\definecolor{red-light}{HTML}{ffa4a2}
\definecolor{purple-dark}{HTML}{ba68c8}
\definecolor{purple-light}{HTML}{ee98fb}
%% Graphics
\RequirePackage{tikz,graphicx}
%% Algorithms
\RequirePackage{algorithm,algpseudocodex}
%% Standalone
\RequirePackage{standalone}
%% References and citations
\RequirePackage[colorlinks=true,allcolors=orange-dark]{hyperref}
\RequirePackage{cleveref}
%% Bibliography
\RequirePackage[backend=biber,style=numeric,citestyle=numeric-comp,sorting=none,doi=false,isbn=false,url=false,eprint=false]{biblatex}
%% Theme
\usetheme[progressbar=foot,block=fill]{metropolis}
\setbeamercolor{normal text}{fg=gray-dark, bg=gray-light}
\setbeamercolor{alerted text}{fg=orange-dark, bg=orange-light}
\setbeamercolor{example text}{fg=green-dark, bg=green-light}
%% Draft option
\newif\if@loaddraft\@loaddraftfalse
\DeclareOption{draft}{\@loaddrafttrue}
\ProcessOptions\relax
\if@loaddraft
\RequirePackage[firstpage]{draftwatermark}
\fi