-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamerinnerthemeuvt.sty
209 lines (173 loc) · 6.13 KB
/
beamerinnerthemeuvt.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
% SPDX-FileCopyrightText: 2023 Alexandru Fikl <alexfikl@gmail.com>
% SPDX-License-Identifier: CC-BY-4.0
\def\fileversion{v0.1}
\def\filedate{2023/12/21}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerinnerthemeuvt}[\filedate \fileversion UVT Beamer Inner Theme]
% <<< options
\RequirePackage{ifthen}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=uvt,
prefix=uvt@inner@
}
% select language for logos
\DeclareStringOption[english]{language}
\ProcessOptionsBeamer
\DeclareDefaultOption{\PackageWarning{beamerinnerthemeuvt}{Unknown option `\CurrentOption`}}
\ProcessKeyvalOptions*
\ifthenelse{\equal{\uvt@inner@language}{english}}{
\def\uvt@inner@whitelogo{assets/uvt-background-logo-white-en}
\def\uvt@inner@blacklogo{assets/uvt-background-logo-black-en}
}{
\ifthenelse{\equal{\uvt@inner@language}{romanian}}{
\def\uvt@inner@whitelogo{assets/uvt-background-logo-white-ro}
\def\uvt@inner@blacklogo{assets/uvt-background-logo-black-ro}
}{
\PackageError{beamerinnerthemeuvt}{Unknown language `\uvt@inner@language`}{}
}}
% >>>
% <<< templates
\setbeamertemplate{background}[uvtslide]
\NewDocumentCommand \titleframe {} {
\setbeamertemplate{title page}[uvttitlepage]
\setbeamertemplate{background}[uvttitlepage]
\frame[plain,noframenumbering]{\titlepage}
\setbeamertemplate{background}[uvtslide]
}
\NewDocumentCommand \sectionframe {} {
\setbeamertemplate{section page}[uvtsectionpage]
\setbeamertemplate{background}[uvttitlepage]
\frame[plain,noframenumbering]{\sectionpage}
\setbeamertemplate{background}[uvtslide]
}
\AtBeginSection{
\sectionframe
}
% >>>
% <<< styles
\defbeamertemplate{title page}{uvttitlepage}
{
\vspace{0.55\paperheight}
\begin{center}
% title format
\usebeamerfont{title}\usebeamercolor[fg]{title}
\inserttitle\par
% subtitle
\usebeamerfont{subtitle}\insertsubtitle\par%
\bigskip
% author
\usebeamerfont{author}\insertauthor\par%
\usebeamerfont{date}\insertdate%
\@ifundefined{uvt@venue}{}{\par\usebeamerfont{venue}\uvt@venue}
\end{center}
}
\defbeamertemplate{section page}{uvtsectionpage}
{
\vspace{0.55\paperheight}
\begin{center}
\begin{minipage}[t][][c]{\textwidth}%
\centering
\usebeamerfont{section title}\usebeamercolor[fg]{section title}
\insertsectionhead\par
\end{minipage}
\end{center}
\vfill
}
% <<< background
\defbeamertemplate{background}{uvttitlepage}
{
\begin{tikzpicture}[remember picture, overlay]
\node [shading=axis,
rectangle,
left color=UVTDarkBlue,
right color=UVTLightBlue!70,
shading angle=45,
anchor=north,
minimum width=\paperwidth, minimum height=\paperheight]
(box) at (current page.north) {};
\node [opacity=0.5, anchor=north, yshift=-0.7cm] at (current page.north)
{\includegraphics[width=0.45\paperheight]{\uvt@inner@whitelogo}};
\end{tikzpicture}
}
\defbeamertemplate{background}{uvtslide}{
\begin{tikzpicture}[remember picture, overlay]
\node [opacity=0.01] at (current page.center)
{\includegraphics[width=0.4\paperwidth]{\uvt@inner@blacklogo}};
\end{tikzpicture}
}
% >>>
% <<< itemize / enumerate
\setbeamertemplate{itemize item}{
\tikz{
\draw[fill=UVTYellow, draw=none] (0, 0) rectangle (0.1, 0.1);
\draw[fill=UVTYellow, draw=none] (0.1, 0.1) rectangle (0.2, 0.2);
\draw[fill=UVTYellow, draw=none] (0, 0.2) rectangle (0.1, 0.3);
}
}
\setbeamertemplate{itemize subitem}{
\tikz{
\draw[fill=UVTDarkBlue, draw=none] (0, 0) rectangle (0.075, 0.075);
\draw[fill=UVTDarkBlue, draw=none] (0.075, 0.075) rectangle (0.15, 0.15);
\draw[fill=UVTDarkBlue, draw=none] (0, 0.15) rectangle (0.075, 0.225);
}
}
\setbeamertemplate{itemize subsubitem}{
\tikz{
\draw[fill=white, draw=none] (0, 0) rectangle (0.075, 0.075);
\draw[fill=UVTLightBlue, draw=none] (0.075, 0.075) rectangle (0.15, 0.15);
\draw[fill=white, draw=none] (0, 0.15) rectangle (0.075, 0.225);
}
}
% >>>
% <<< blocks
\setbeamertemplate{block begin}{
\vspace{\fill}
\begin{adjustbox}{max width=0.98\textwidth, trim=0 2ex 0 0,clip}
\begin{tabular}{!{\color{UVTDarkBlue}{\vrule width 4pt}}>{\columncolor[gray]{0.97}}m{\textwidth}}
\begin{beamercolorbox}{block title}
\usebeamerfont*{block title}
\vbox{}\vskip 0.2ex
\insertblocktitle
\end{beamercolorbox}
\usebeamerfont*{block text}
}
\setbeamertemplate{block end}{\end{tabular}\end{adjustbox}}
\setbeamertemplate{block alerted begin}{
\vspace{\fill}
\begin{adjustbox}{max width=0.98\textwidth, trim=0 2ex 0 0,clip}
\begin{tabular}{!{\color{UVTYellow}{\vrule width 4pt}}>{\columncolor[gray]{0.97}}m{\textwidth}}
\begin{beamercolorbox}{alerted text}
\usebeamerfont*{block title}
\vbox{}\vskip 0.2ex
\insertblocktitle
\end{beamercolorbox}
\usebeamerfont*{block text}
}
\setbeamertemplate{block alerted end}{\end{tabular}\end{adjustbox}}
\setbeamertemplate{block example begin}{
\vspace{\fill}
\begin{adjustbox}{max width=0.98\textwidth, trim=0 2ex 0 0,clip}
\begin{tabular}{!{\color{UVTLightBlue}{\vrule width 4pt}}>{\columncolor[gray]{0.97}}m{\textwidth}}
\begin{beamercolorbox}{example text}
\usebeamerfont*{block title}
\vbox{}\vskip 0.2ex
\insertblocktitle
\end{beamercolorbox}
\usebeamerfont*{block text}
}
\setbeamertemplate{block example end}{\end{tabular}\end{adjustbox}}
% >>>
% <<< figures
% disable "Figure:" in the captions
\setbeamertemplate{caption}{\scriptsize\insertcaption}
\setbeamertemplate{caption label separator}{}
% >>>
% >>>
\setbeamersize{
text margin left=.05\paperwidth,
text margin right=.05\paperwidth,
description width=0.075\paperwidth,
}
\setlength{\labelsep}{\dimexpr\labelsep - 0.2em\relax}
%% vim: foldmarker=<<<,>>>:foldmethod=marker:nospell:filetype=tex