Debian Codegraph @

texmf-dist/source/latex/beamertheme-trigon/beamerthemetrigon.dtx

raw
1 % \iffalse meta-comment -------------------------------------------------------
2 % Copyright (C) 2021 Thomas Lambert <[email protected]>
3 % Other contributors to this theme are listed here:
4 % https://gitlab.com/thlamb/beamertheme-trigon/-/graphs/master
5 %
6 % The original template was heavily inspired by Metropolis from Matthias
7 % Vogelgesang.
8 %
9 % License CC-BY-SA 4.0
10 % This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
11 % International License (https://creativecommons.org/licenses/by-sa/4.0/)
12 % ------------------------------------------------------------------------- \fi
13 % \iffalse
14 %<*package>
15 \NeedsTeXFormat{LaTeX2e}
16 \ProvidesPackage{beamerthemetrigon}[2023/02/20 v0.7.0 Trigon Beamer theme]
17 %</package>
18 % \fi
19 % \CheckSum{0}
20 % \StopEventually{}
21 % \iffalse
22 %<*package>
23 % ------------------------------------------------------------------------- \fi
24 %
25 %
26 % \subsection{\themename parent theme}
27 %
28 % The primary job of this package is to load the component sub-packages of the
29 % \themename theme and route the theme options accordingly. It also
30 % provides some custom commands and environments for the user.
31 %
32 % \subsubsection{Package dependencies}
33 %
34 % \begin{macrocode}
35 \RequirePackage{pgfopts}
36 \RequirePackage{tikz}
37 % \end{macrocode}
38 %
39 %\subsubsection{Options}
40 %
41 % Most options are passed off to the component sub-packages.
42 % \begin{macrocode}
43 \pgfkeys{/trigon/.cd,
44 .search also={
45 /trigon/inner,
46 /trigon/outer,
47 /trigon/color,
48 /trigon/font
49 }
50 }
51 % \end{macrocode}
52 %
53 % \begin{macro}{titleformat plain}
54 % Controls the formatting of the text on standout ``plain'' frames.
55 % \begin{macrocode}
56 \pgfkeys{
57 /trigon/titleformat plain/.cd,
58 .is choice,
59 regular/.code={%
60 \let\trigon@plaintitleformat\@empty%
61 \setbeamerfont{standout}{shape=\normalfont}%
62 },
63 smallcaps/.code={%
64 \let\trigon@plaintitleformat\@empty%
65 \setbeamerfont{standout}{shape=\scshape}%
66 },
67 allsmallcaps/.code={%
68 \let\trigon@plaintitleformat\MakeLowercase%
69 \setbeamerfont{standout}{shape=\scshape}%
70 \PackageWarning{beamerthemetrigon}{%
71 Be aware that titleformat plain=allsmallcaps can lead to problems%
72 }
73 },
74 allcaps/.code={%
75 \let\trigon@plaintitleformat\MakeUppercase%
76 \setbeamerfont{standout}{shape=\normalfont}%
77 \PackageWarning{beamerthemetrigon}{%
78 Be aware that titleformat plain=allcaps can lead to problems%
79 }
80 },
81 }
82 % \end{macrocode}
83 % \end{macro}
84 %
85 % \begin{macro}{titleformat}
86 % Sets a standard format for titles, subtitles, section titles, frame titles,
87 % and the text on standout ``plain'' frames.
88 % \begin{macrocode}
89 \pgfkeys{
90 /trigon/titleformat/.code=\pgfkeysalso{
91 font/titleformat title=#1,
92 font/titleformat subtitle=#1,
93 font/titleformat section=#1,
94 font/titleformat frame=#1,
95 titleformat plain=#1,
96 }
97 }
98 % \end{macrocode}
99 % \end{macro}
100 %
101 % \begin{macro}{usesourcefonts}
102 % Select whereas the Source Sans Pro font is being loaded automatically or not.
103 % \begin{macrocode}
104 \newif\if@trigon@usesourcefonts
105 \pgfkeys{/trigon/.cd,
106 usesourcefonts/.is if=@trigon@usesourcefonts,
107 usesourcefonts=true,
108 }
109 % \end{macrocode}
110 % \end{macro}
111 %
112 %
113 % \subsubsection{Component sub-packages}
114 %
115 % Having processed the options, we can now load the component sub-packages of
116 % the theme.
117 %
118 % \begin{macrocode}
119 \useinnertheme{trigon}
120 \useoutertheme{trigon}
121 \usecolortheme{trigon}
122 \usefonttheme{trigon}
123 % \end{macrocode}
124 %
125 %
126 % \subsubsection{Custom commands}
127 %
128 % The parent theme defines custom commands as their proper usage may depend
129 % on multiple sub-packages.
130 %
131 % \begin{macro}{\metroset}
132 % Allows the user to change options midway through a presentation.
133 % \begin{macrocode}
134 \newcommand{\trigonset}[1]{\pgfkeys{/trigon/.cd,#1}}
135 % \end{macrocode}
136 % \end{macro}
137 %
138 %
139 % \subsubsection{Process package options}
140 %
141 % \begin{macrocode}
142 \ProcessOptionsBeamer
143 \ProcessPgfOptions{/trigon}
144 \if@trigon@usesourcefonts%
145 \RequirePackage[default,t1,semibold]{sourcesanspro}
146 \fi
147 % \end{macrocode}
148 %
149 % \iffalse
150 %</package>
151 % \fi
152 % \Finale
153 \endinput