-
Notifications
You must be signed in to change notification settings - Fork 0
/
baseline.cls
140 lines (105 loc) · 3.67 KB
/
baseline.cls
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
137
138
139
140
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{baseline}[2022/03/05 Baseline article template]
\newif\if@flagslides\@flagslidesfalse
\DeclareOption{slides}{\@flagslidestrue}
\newif\if@flagslidenotes\@flagslidenotesfalse
\DeclareOption{notes}{\@flagslidenotestrue}
\newif\if@flagdark\@flagdarkfalse
\DeclareOption{dark}{\@flagdarktrue}
\DeclareOption{draft}{
\PassOptionsToPackage{draft}{graphicx}
}
\ProcessOptions\relax
\PassOptionsToPackage{T1}{fontenc}
\RequirePackage{fontenc}
\if@flagslides
\PassOptionsToClass{14pt}{beamer}
\LoadClass{beamer}
\setbeamertemplate{footline}{}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{date}{size=\footnotesize}
\setbeamerfont{institute}{size=\footnotesize}
\setbeamerfont{frametitle}{series=\fontseries{regular},parent=structure}
\setbeamerfont{title}{series=\fontseries{medium}}
\if@flagslidenotes
\RequirePackage{pgfpages}
\setbeameroption{show notes on second screen=right}
\setbeamertemplate{note page}[plain]
\fi
\if@flagdark
\usecolortheme[RGB={79,119,163}]{structure}
\definecolor{SlideBg}{RGB}{0,0,0}
\definecolor{TextColor}{RGB}{217,217,217}
\setbeamerfont{section in toc}{series=\fontseries{regular}}
\else
\usecolortheme[RGB={5,46,102}]{structure}
\definecolor{SlideBg}{RGB}{237,237,237}
\definecolor{TextColor}{RGB}{67,67,67}
\fi
\setbeamercolor{normal text}{bg=SlideBg,fg=TextColor}
\PassOptionsToPackage{defaultfam}{montserrat}
\PassOptionsToPackage{thin}{montserrat}
\PassOptionsToPackage{semibold}{montserrat}
\PassOptionsToPackage{tabular}{montserrat}
\PassOptionsToPackage{lining}{montserrat}
\RequirePackage{montserrat}
\renewcommand*\oldstylenums[1]{{\fontfamily{Montserrat-TOsF}\selectfont #1}}
\else
\PassOptionsToClass{12pt}{article}
\PassOptionsToClass{a4paper}{article}
\LoadClass{article}
\newlength{\alphabet}
\settowidth{\alphabet}{\normalfont abcdefghijklmnopqrstuvwxyz}
\PassOptionsToPackage{textwidth=2.3\alphabet}{geometry}
\RequirePackage{geometry}
\setlength{\parindent}{0pt}
\setlength{\parskip}{4pt}
\RequirePackage{setspace}
\onehalfspacing
\PassOptionsToPackage{activate={true,nocompatibility}}{microtype}
\PassOptionsToPackage{final}{microtype}
\PassOptionsToPackage{tracking=true}{microtype}
\PassOptionsToPackage{kerning=true}{microtype}
\PassOptionsToPackage{spacing=true}{microtype}
\PassOptionsToPackage{factor=1100}{microtype}
\PassOptionsToPackage{stretch=10}{microtype}
\PassOptionsToPackage{shrink=10}{microtype}
\RequirePackage{microtype}
\RequirePackage{inconsolata}
\PassOptionsToPackage{oldstyle}{XCharter}
\PassOptionsToPackage{sups}{XCharter}
\RequirePackage{XCharter}
\frenchspacing
\PassOptionsToPackage{compact}{titlesec}
\RequirePackage{titlesec}
\newcommand{\flatcaps}[1]{\textsc{\MakeLowercase{#1}}}
\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}{\large}{\thesubsection}{.6em}{\flatcaps}
\titleformat{\subsubsection}{}{\thesubsubsection}{0.6em}{\itshape}
\titlespacing*{\section}{0pt}{2\baselineskip}{0.5\baselineskip}
\titlespacing*{\subsection}{0pt}{1\baselineskip}{0.5\baselineskip}
\titlespacing*{\subsubsection}{0pt}{8pt}{5pt}
\PassOptionsToPackage{backend=biber}{biblatex}
\PassOptionsToPackage{block=ragged}{biblatex}
\PassOptionsToPackage{style=ieee}{biblatex}
\RequirePackage{biblatex}
\let\oldcite\cite
\renewcommand\cite{\unskip~\oldcite}
\RequirePackage{subcaption}
\RequirePackage{float}
\RequirePackage{tikz}
\RequirePackage{tikz-network}
\RequirePackage{hyperref}
\RequirePackage{cleveref}
\RequirePackage{titling}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[R]{\theauthor}
\fancyhead[L]{\rightmark}
\RequirePackage{enumitem}
\fi
\RequirePackage{xcolor}
\RequirePackage{booktabs}
\RequirePackage{graphicx}
\RequirePackage{svg}
\RequirePackage{minted}