summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/beamertheme-pure-minimalistic/beamerfontthemepureminimalistic.sty
blob: 7df83b361e776c65ff69221210843692f4d11db0 (plain)
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
% A pure minimalistic LaTeX-Beamer theme for everyone to use.
% Copyright (C) 2020 Kai Norman Clasen

% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.

% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.

% You should have received a copy of the GNU General Public License
% along with this program.  If not, see <https://www.gnu.org/licenses/>.

% This file is part of beamerthemepureminimalistic.

% If problems/bugs are found or enhancements are desired, please contact
% me over: https://github.com/kai-tub/latex-beamer-pure-minimalistic

\ProvidesPackage{beamerfontthemepureminimalistic}[v1.2.4]
\RequirePackage{ifthen}
\mode<presentation>

\newboolean{nofirafonts}
\setboolean{nofirafonts}{false}
\newboolean{helvetica}
\setboolean{helvetica}{false}

\DeclareOptionBeamer{nofirafonts}{\setboolean{nofirafonts}{true}}
\DeclareOptionBeamer{helvetica}{\setboolean{helvetica}{true}}
\ProcessOptionsBeamer

\RequirePackage{silence}
% I have no clue how I can fix this warning
\WarningFilter{latex}{Font shape declaration has incorrect series value}

\ifthenelse{\boolean{helvetica}}{%
    % If Helvetica overwrites the fira fonts settings
    \RequirePackage[T1]{fontenc}
    \RequirePackage[scaled]{helvet}
}{%
    \ifthenelse{\boolean{nofirafonts}}{%
        % Load default fonts
    }{%
        % By default load Fira
        \RequirePackage[T1]{fontenc}
        \RequirePackage[sfdefault]{FiraSans}
        \RequirePackage{FiraMono}
    }
}

\renewcommand\normalsize{\fontsize{12pt}{14pt}\selectfont}
\renewcommand\small{\fontsize{10pt}{12pt}\selectfont}
\renewcommand\large{\fontsize{14pt}{16pt}\selectfont}
\renewcommand\Large{\fontsize{16pt}{18pt}\selectfont}

\setbeamerfont{normal text}{family=\sffamily,size*={12pt}{14pt},series=\mdseries}
\setbeamerfont{alerted text}{parent=normal text}

\setbeamerfont{structure}{parent=normal text,series=\mdseries}

\setbeamerfont{footline}{parent=structure,size*={8pt}{10pt}}

\setbeamerfont{title}{size*={14pt}{16pt},parent=alerted text,shape=\scshape}
\setbeamerfont{title in head/foot}{parent=footline,series=\bfseries}

\setbeamerfont{subtitle}{parent=title,shape=\upshape}

\setbeamerfont{section in toc}{parent=normal text}
\setbeamerfont{subsection in toc}{parent=section in toc}
\setbeamerfont{subsubsection in toc}{parent=subsection in toc}

\setbeamerfont{author}{parent=normal text}
\setbeamerfont{author in head/foot}{parent=footline}
\setbeamerfont*{institute}{parent=normal text}

\setbeamerfont{frametitle}{parent=alerted text,size*={16pt}{18pt}}
\setbeamerfont{caption}{series=\normalfont, size=\small}
\setbeamerfont{caption name}{series=\normalfont, size=\small}

\setbeamerfont*{itemize/enumerate body}{parent=normal text}
\setbeamerfont*{itemize/enumerate subbody}{parent=itemize/enumerate body}
\setbeamerfont*{itemize/enumerate subsubbody}{parent=itemize/enumerate subbody}

\mode<all>