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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
|
%% ---------------------------------------------------------------------------
%% Copyright (C) 2021 Thomas Lambert <trigon@thl.ovh>
%% Other contributors to this theme are listed here:
%% https://gitlab.com/thlamb/beamertheme-trigon/-/graphs/master
%%
%% The original template was heavily inspired by Metropolis from Matthias
%% Vogelgesang.
%%
%% License CC-BY-SA 4.0
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
%% International License (https://creativecommons.org/licenses/by-sa/4.0/)
%% ---------------------------------------------------------------------------
\documentclass{ltxdoc}
%\OnlyDescription
\usepackage{xcolor}
\definecolor{tPrim}{HTML}{00707F} % Green-Blue
\definecolor{tSec}{HTML}{5FA4B0} % Green-Blue light
\definecolor{tAccent}{HTML}{F07F3C} % Orange
\definecolor{tGrey}{HTML}{E6E6E1} % Grey-Beige
\usepackage[default,t1,semibold]{sourcesanspro}
\usepackage{parskip}
\usepackage{setspace}
\usepackage{xspace}
\onehalfspacing
%\usepackage{enumitem}
%\setlist[itemize]{noitemsep}
%\setlist[enumerate]{noitemsep}
\usepackage{listings}
\lstset{%
language=[LaTeX]{TeX},
basicstyle=\ttfamily,
keywordstyle=\color{tPrim}\bfseries,
commentstyle=\color{tSec},
stringstyle=\color{tSec},
backgroundcolor=\color{white},
numbers=none,
numberstyle=\tiny\ttfamily,
stepnumber=2,
showspaces=false,
showstringspaces=false,
showtabs=false,
frame=none,
framerule=1pt,
tabsize=2,
rulesep=5em,
captionpos=b,
breaklines=true,
breakatwhitespace=false,
framexleftmargin=0em,
framexrightmargin=0em,
xleftmargin=0em,
xrightmargin=0em,
aboveskip=1em,
belowskip=1em,
morekeywords={usetheme,institute,maketitle,@trigon@titleformat,%
plain,trigonset,setbeamercolor},
}
\lstMakeShortInline|
\usepackage{metalogo}
\setcounter{tocdepth}{2}
\usepackage[colorlinks=true,
linkcolor=tPrim,
menucolor=tPrim,
urlcolor=tPrim]{hyperref}
\setlength{\fboxsep}{0pt}%
\usepackage{caption} % For subfigures
\usepackage{subcaption} % For subfigures
\newcommand{\DescribeOption}[4]{
\DescribeMacro{#1}
\begin{minipage}[t]{\textwidth}
\textit{\textbf{\textcolor{tSec}{#2}}}\dotfill\,#3\par
\begingroup
\vspace{0.5em}#4\par
\endgroup
\end{minipage}
}
%% ------------------------------------------------------------------------------
\newcommand{\themename}{\textbf{\textsc{Trigon}}\xspace}
\usepackage{readprov}
\ReadPackageInfos{beamerthemetrigon}
%% =============================================================================
\title{\textsc{Trigon}\\ A Modern, elegant and versatile theme for Beamer}
\author{Thomas Lambert \\ \url{trigon@thl.ovh}}
\date{\fileversion~---~\filedate}
%% =============================================================================
\begin{document}
\maketitle
\tableofcontents
%% ------------------------------------
\section{Introduction}
\themename found its origin and inspiration in the graphical guidelines
resulting from the visual identity overhaul of the
\href{https://www.uliege.be}{Univeristy of Liège} (Belgium).\\
Although directly inspired from these guidelines, \themename was stripped out of
any mention or specificities related the University and its faculties. This
makes the \themename theme perfectly suitable for many different contexts.
The final product provides a modern, elegant and versatile theme with a
high degree of customization.
\themename's codebase lives on
\href{https://gitlab.com/thlamb/beamertheme-trigon} {Gitlab}. The implementation
of this theme is strongly inspired from the excellent
\href{https://github.com/matze/mtheme}{\textsc{Metropolis}} theme by Matthias
Vogelgesang, from which it borrows numerous options.\newline
Any feature request, issue report or merge requests are welcome.
%% ------------------------------------
\section{Getting Started}
\subsection{Installing from Gitlab}
If you want to use the cutting-edge development version of \themename, you can
install it manually by following these steps:
\begin{description}
\item[Download the source] from
\href{https://gitlab.com/thlamb/beamertheme-trigon}{\themename repository}
using |git clone| or as a \href{https://gitlab.com/thlamb/beamertheme-trigon/-/archive/master/beamertheme-trigon-master.zip}{zip archive} of the latest development version.
\item[Compile the style files] by running |make sty| inside the downloaded
directory. (Or run \LaTeX{} directly on |source/trigontheme.ins|.)
\item[Move the resulting |*.sty| files] to the folder containing your
presentation. To use \themename with many presentations, run
|make install| or move the |*.sty| files to a folder in your \TeX{} path
instead.
\item[Use the theme] by declaring |\usetheme{trigon}| in the preamble of your
document.
\end{description}
\themename uses the Make build system to offer the following installation
options for advanced users:
\begin{description}
\item[|make sty|] builds the theme style files.
\item[|make doc|] builds this documentation manual.
\item[|make demo|] builds a demo presentation to test the features of
\themename.
\item[|make all|] builds the theme and manual.
\item[|make clean|] removes the files generated by |make all|.
\item[|make install|] installs the theme into your local texmf folder.
\item[|make uninstall|] removes the theme from your local texmf folder.
\end{description}
\subsection{Other install methods}
\themename will be proposed for integration on \href{https://www.ctan.org}{CTAN}
shortly. It will then hopefully be integrated to texlive, miktex, etc. In the
meantime, only the installation from Gitlab is possible.
Once accepted on CTAN, the theme will also be made available on
\href{https://www.overleaf.com}{Overleaf}.
\subsection{A Minimal Example}
The following code shows a minimal example of a Beamer presentation using
\themename.
\begin{lstlisting}
\documentclass{beamer}
\usetheme{trigon} % Use trigon theme
\title{A minimal example}
\subtitle{A subtitle example}
\date{\today}
\author{Thomas Lambert}
\institute{Your university or company}
\begin{document}
\maketitle
\section{First Section}
\begin{frame}{First Frame}
Hello, world!
\end{frame}
\end{document}
\end{lstlisting}
\subsection{Dependencies}
\themename depends on the |beamer| class and the following standard packages:
\begin{itemize}
\item |tikz|
\item |pgfopts|
\end{itemize}
The theme works best with the open source
\href{https://fonts.adobe.com/fonts/source-sans}{Source Sans Pro} font from
Adobe.\newline
Therefore, the package |sourcesanspro| is loaded by default with the theme.
However, if the user prefers to select an other font, the theme option
|nosourcefonts| can be used to prevent the font package from being loaded.
%% ------------------------------------
\section{Customization}
\subsection{Package options}
\themename provides a number of options, which can be set using a key=value
interface. The primary way to set options is to provide a comma-separated list
of option-value pairs when loading \themename in the preamble:
\begin{lstlisting}
\usetheme[option1=value1, option2=value2, ...]{trigon}
\end{lstlisting}
Options can be changed at any time --- even mid-presentation! --- with the
|\trigonset| macro.
\begin{lstlisting}
\trigonset{option1=newvalue1, option2=newvalue2, ...}
\end{lstlisting}
The list of options is structured as shown in the following example.
\DescribeOption{option key}{list of possible values}{default}{
A short description of the option.
}
As \themename implementation is heavily inspired from the excellent
\href{https://github.com/matze/mtheme}{\textsc{Metropolis}} theme by Matthias
Vogelgesang, many of \textsc{Metropolis} options are also available in
\themename.
\subsubsection{Main theme}
\DescribeOption{titleformat}%
{regular, smallcaps, allsmallcaps, allcaps}
{regular}{
Changes the format of titles, subtitles, section titles, frame titles, and
the text on ``standout'' frames. The available options produce
Regular, \textsc{SmallCaps}, \textsc{\MakeLowercase{AllSmallCaps}}, or
\MakeUppercase{AllCaps} titles. Please refer to
Section~\ref{sec:titleformats} for known issues with these options.
}
\DescribeOption{usesourcefonts}{true,false}{true}{%
Choses if the |sourcesanspro| font package should be loaded |true| or not
|false|.
}
\subsubsection{Inner theme}
\DescribeOption{sectionpage}{none, simple}{simple}{
Adds a slide at the start of each section (|simple|). The |none| option
disables the section page.
}
\DescribeOption{titlestyle}{plain, style1, style2}{style2}{
Changes the layout of the title page.
}
\begin{figure}[h!]
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-02.jpg}}
\caption*{plain}
\end{subfigure}
\hspace{\fill}
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-03.jpg}}
\caption*{style1}
\end{subfigure}
\hspace{\fill}
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-01.jpg}}
\caption*{style2 (default)}
\end{subfigure}
\end{figure}
\DescribeOption{sectionstyle}{plain, style1, style2, style3}{plain}{
Changes the layout of the section page. |style3| is similar to |plain| but
with the right triangle in grey instead of theme color.
}
\begin{figure}[h!]
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-04.jpg}}
\caption*{plain (default)}
\end{subfigure}
\hspace{\fill}
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-05.jpg}}
\caption*{style1}
\end{subfigure}
\hspace{\fill}
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-06.jpg}}
\caption*{style2}
\end{subfigure}
\end{figure}
\DescribeOption{slidestyle}{blank, style1, cyber}{blank}{
Changes the background of the regular frames.
}
\begin{figure}[h!]
\hspace{\fill}
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-08.jpg}}
\caption*{blank (default)}
\end{subfigure}
\hspace{\fill}
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-09.jpg}}
\caption*{style1}
\end{subfigure}
\hspace{\fill}
\begin{subfigure}[b]{0.3\textwidth}
\fbox{\includegraphics[width=\textwidth]{screenshots/layout_example-10.jpg}}
\caption*{cyber}
\end{subfigure}
\end{figure}
\subsubsection{Outer theme}
\DescribeOption{numbering}{none, counter, fraction}{counter}{
Controls whether the frame number at the bottom right of each slide is
omitted (|none|), shown (|counter|) or displayed as a fraction of the total
number of frames (|fraction|).
}
\subsubsection{Color theme}
\DescribeOption{block}{transparent, fill}{fill}{
Optionally adds a light grey background to block environments like |theorem|
and |example|.
}
\DescribeOption{headingcolor}{black, theme}{black}{
Controls weather the color of all headings (title page, frame title, etc.)
should be in |black| in a slightly darker shade of the theme color |theme|.
}
\DescribeOption{textgcolor}{black, theme}{black}{
Controls weather the color of the regular text elements should be in |black|
in a slightly darker shade of the theme color |theme|.
}
\subsubsection{Font theme}
\DescribeMacro{titleformat title}
\DescribeMacro{titleformat subtitle}
\DescribeMacro{titleformat section}
\DescribeOption{titleformat frame}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Individually controls the format of titles, subtitles, section titles, and
frame titles (see |titleformat|, above).
}
\subsection{Color Customization}
The included \themename color theme is used by default, but its colors can be
easily changed to suit your tastes. All of the theme's styles are defined in
terms of four colors:
\begin{itemize}
\item |tPrim| The primary theme color, used for main triangle elements, and
for headings and text if the appropriate options are selected.
\item |tSec| The secondary theme color (lighter shade of the primary color),
used for some triangle elements and example text.
\item |tAccent| The accent color, used mostly for alerted text.
\item |tGrey| A grey color, used for background elements (triangles, blocks,
etc.).
\end{itemize}
An easy way to customize the theme is to redefine these colors using
\begin{lstlisting}
\colorlet{tPrim}{ ... }
\colorlet{tSec}{ ... }
\colorlet{tAccent}{ ... }
\colorlet{tGrey}{ ... }
\end{lstlisting}
in your preamble.
\section{Tips \& Tricks}
\subsection{Backup Slides}
Speakers will often include extra slides at the end of their presentation to
refer to during audience questions. One easy way to do this is to include the
\verb|appendixnumberbeamer| package in your preamble and call \verb|\appendix|
before your backup slides.
\themename will automatically turn off slide numbering for slides in the
appendix.
\section{Known Issues}
\subsection{Title formats}
\label{sec:titleformats}
Be aware that not every font supports small caps, so the |smallcaps| or
|allsmallcaps| options may not work if you use a font other than
|sourcesanspro|.
The title format options |allsmallcaps| and |allcaps| are quite nice from an
aesthetic point of view, but their use of |\MakeLowercase| and
|\MakeUppercase| can cause unexpected problems. For example:
\begin{itemize}
\item Some commands, like |\\|, do not work inside |\MakeLowercase| and
|\MakeUppercase|. (See \textsc{Metropolis}
\href{https://github.com/matze/mtheme/issues/125} {\#125})
\item Only alphabetic characters are affected by |\MakeLowercase|, so
numerals and punctuation remain at full height. This can spoil some of the
aesthetic benefits of |allsmallcaps|. (See \textsc{Metropolis}
\href{https://github.com/matze/mtheme/issues/33}{\#33})
\item |\MakeLowercase| and |\MakeUppercase| apply to math mode and
|\scshape| does not. This can easily introduce mathematical errors that
are hard to catch.
\item It is impossible to typeset symbols which are encoded as uppercase
letters in a different font. In particular, |\mathbb| and |\mathcal|
letters will be replaced by other math glyphs. (See \textsc{Metropolis}
\href{https://github.com/matze/mtheme/issues/153}{\#153})
\end{itemize}
The |allsmallcaps| and |allcaps| options are safe to use if your titles contain
only alphabetic characters and do not require the expansion of any macros.
\section{License}
\themename is licensed under the terms of the
\href{https://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
Attribution-ShareAlike 4.0} license.
\section{Implementation}
\DocInput{beamerthemetrigon.dtx}
\DocInput{beamerinnerthemetrigon.dtx}
\DocInput{beamerouterthemetrigon.dtx}
\DocInput{beamerfontthemetrigon.dtx}
\DocInput{beamercolorthemetrigon.dtx}
\end{document}
|