Debian Codegraph @

texmf-dist/tex/latex/beamer/beamerinnerthemedefault.sty

raw
1 % Copyright 2007 by Till Tantau
2 % Copyright 2012-2015 by Vedran Mileti\'c, Joseph Wright
3 % Copyright 2017,2018 by Louis Stuart, Joseph Wright
4 % Copyright 2021-2026 by Joseph Wright, samcarter
5 %
6 % This file may be distributed and/or modified
7 %
8 % 1. under the LaTeX Project Public License and/or
9 % 2. under the GNU Public License.
10 %
11 % See the file LICENSE.md for more details.
12
13 \mode<presentation>
14
15 % Some images:
16
17 \pgfdeclareimage[width=14pt,height=12pt]{beamericonbook}{beamericonbook}
18 \pgfdeclareimage[width=14pt,height=12pt]{beamericonbookshaded}{beamericonbook.20}
19 \pgfaliasimage{beamericonbook.!20opaque}{beamericonbookshaded}
20 \pgfaliasimage{beamericonbook.!15opaque}{beamericonbookshaded}
21 \pgfaliasimage{beamericonbook.!10opaque}{beamericonbookshaded}
22 \pgfaliasimage{beamericonbook.!5opaque}{beamericonbookshaded}
23 \pgfaliasimage{beamericonbook.!2opaque}{beamericonbookshaded}
24 \pgfdeclareimage[width=11pt,height=14pt]{beamericonarticle}{beamericonarticle}
25 \pgfdeclareimage[width=11pt,height=14pt]{beamericonarticleshaded}{beamericonarticle.20}
26 \pgfaliasimage{beamericonarticle.!20opaque}{beamericonarticleshaded}
27 \pgfaliasimage{beamericonarticle.!15opaque}{beamericonarticleshaded}
28 \pgfaliasimage{beamericonarticle.!10opaque}{beamericonarticleshaded}
29 \pgfaliasimage{beamericonarticle.!5opaque}{beamericonarticleshaded}
30 \pgfaliasimage{beamericonarticle.!2opaque}{beamericonarticleshaded}
31 \pgfdeclareimage[width=14pt,height=14pt]{beamericononline}{beamericononline}
32 \pgfdeclareimage[width=14pt,height=14pt]{beamericononlineshaded}{beamericononline.20}
33 \pgfaliasimage{beamericononline.!20opaque}{beamericononlineshaded}
34 \pgfaliasimage{beamericononline.!15opaque}{beamericononlineshaded}
35 \pgfaliasimage{beamericononline.!10opaque}{beamericononlineshaded}
36 \pgfaliasimage{beamericononline.!5opaque}{beamericononlineshaded}
37 \pgfaliasimage{beamericononline.!2opaque}{beamericononlineshaded}
38
39 % Title page: default
40
41 \defbeamertemplate{title}{default}[1][]{%
42 \begin{beamercolorbox}[sep=8pt,center,#1]{title}
43 \usebeamerfont{title}\inserttitle\par%
44 \ifx\insertsubtitle\@empty%
45 \else%
46 \vskip0.25em%
47 {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
48 \fi%
49 \end{beamercolorbox}%
50 }
51
52 \defbeamertemplate{author}{default}[1][]{%
53 \begin{beamercolorbox}[sep=8pt,center,#1]{author}
54 \usebeamerfont{author}\insertauthor
55 \end{beamercolorbox}
56 }
57
58 \defbeamertemplate{institute}{default}[1][]{%
59 \begin{beamercolorbox}[sep=8pt,center,#1]{institute}
60 \usebeamerfont{institute}\insertinstitute
61 \end{beamercolorbox}
62 }
63
64 \defbeamertemplate{date}{default}[1][]{%
65 \begin{beamercolorbox}[sep=8pt,center,#1]{date}
66 \usebeamerfont{date}\insertdate
67 \end{beamercolorbox}
68 }
69
70 \defbeamertemplate{titlegraphic}{default}{%
71 {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
72 }
73
74 \defbeamertemplate*{title page}{default}[1][]
75 {
76 \vbox{}
77 \vfill
78 \begingroup
79 \centering
80 \usebeamertemplate{title}
81 \vskip1em\par
82 \usebeamertemplate{author}
83 \usebeamertemplate{institute}
84 \usebeamertemplate{date}
85 \vskip0.5em
86 \usebeamertemplate{titlegraphic}
87 \endgroup
88 \vfill
89 }[action]{
90 \setbeamertemplate{title}[default][#1]
91 \setbeamertemplate{author}[default][#1]
92 \setbeamertemplate{institute}[default][#1]
93 \setbeamertemplate{date}[default][#1]
94 \setbeamertemplate{titlegraphic}[default]
95 }
96
97 % Part page: default
98
99 \defbeamertemplate*{part page}{default}[1][]
100 {
101 \begingroup
102 \centering
103 {\usebeamerfont{part name}\usebeamercolor[fg]{part name}\partname~\insertromanpartnumber}
104 \vskip1em\par
105 \begin{beamercolorbox}[sep=16pt,center,#1]{part title}
106 \usebeamerfont{part title}\insertpart\par
107 \end{beamercolorbox}
108 \endgroup
109 }
110
111
112 % Section page: default
113
114 \defbeamertemplate*{section page}{default}[1][]
115 {
116 \begingroup
117 \centering
118 {\usebeamerfont{section name}\usebeamercolor[fg]{section name}\sectionname~\insertsectionnumber}
119 \vskip1em\par
120 \begin{beamercolorbox}[sep=12pt,center,#1]{section title}
121 \usebeamerfont{section title}\insertsection\par
122 \end{beamercolorbox}
123 \endgroup
124 }
125
126 % Subection page: default
127
128 \defbeamertemplate*{subsection page}{default}[1][]
129 {
130 \begingroup
131 \centering
132 {\usebeamerfont{subsection name}\usebeamercolor[fg]{subsection name}\subsectionname~\insertsubsectionnumber}
133 \vskip1em\par
134 \begin{beamercolorbox}[sep=8pt,center,#1]{subsection title}
135 \usebeamerfont{subsection title}\insertsubsection\par
136 \end{beamercolorbox}
137 \endgroup
138 }
139
140
141
142
143 %
144 % Table of contents
145 %
146
147 \defbeamertemplateparent{sections/subsections in toc}{section in toc,subsection in toc,subsubsection in toc}
148 {}
149
150 \defbeamertemplateparent{sections/subsections in toc shaded}{section in toc shaded,subsection in toc shaded,subsubsection in toc shaded}[1][20]
151 {[#1]}
152
153
154
155
156 % (sub-)section in toc: default
157
158 \defbeamertemplate*{section in toc}{default}
159 {\inserttocsection\par}
160
161 \defbeamertemplate*{subsection in toc}{default}
162 {\leavevmode\leftskip=1.5em\inserttocsubsection\par}
163
164 \defbeamertemplate*{subsubsection in toc}{default}
165 {\leavevmode\normalsize\usebeamerfont{subsection in toc}\leftskip=3em%
166 \usebeamerfont{subsubsection in toc}\inserttocsubsubsection\par}
167
168
169 % (sub-)section in toc shaded, default
170
171 \defbeamertemplate*{section in toc shaded}{default}[1][20]
172 {\begin{colormixin}{#1!parent.bg}\usebeamertemplate{section in toc}\end{colormixin}\unskip}
173
174 \defbeamertemplate*{subsection in toc shaded}{default}[1][20]
175 {\begin{colormixin}{#1!parent.bg}\usebeamertemplate{subsection in toc}\end{colormixin}\unskip}
176
177 \defbeamertemplate*{subsubsection in toc shaded}{default}[1][20]
178 {\begin{colormixin}{#1!parent.bg}\usebeamertemplate{subsubsection in toc}\end{colormixin}\unskip}
179
180
181
182
183
184 %
185 % Item
186 %
187
188 \defbeamertemplateparent{items}{itemize items,enumerate items}
189 {}
190
191
192 % Itemize items
193
194 \defbeamertemplateparent{itemize items}{itemize item,itemize subitem,itemize subsubitem}
195 {}
196
197
198 % Itemize items, default
199
200 \defbeamertemplate*{itemize item}{default}{\usebeamerfont*{itemize item}\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleright$}}
201 \defbeamertemplate*{itemize subitem}{default}{\usebeamerfont*{itemize subitem}\raise1.5pt\hbox{\donotcoloroutermaths$\blacktriangleright$}}
202 \defbeamertemplate*{itemize subsubitem}{default}{\usebeamerfont*{itemize subsubitem}\raise1.5pt\hbox{\donotcoloroutermaths$\blacktriangleright$}}
203
204
205 % Enumerate items, default
206
207 \defbeamertemplateparent{enumerate items}{enumerate item,enumerate subitem,enumerate subsubitem,enumerate mini template}
208 {}
209
210 \defbeamertemplate*{enumerate item}{default}{\insertenumlabel.}
211 \defbeamertemplate*{enumerate subitem}{default}{\insertenumlabel.\insertsubenumlabel}
212 \defbeamertemplate*{enumerate subsubitem}{default}{\insertenumlabel.\insertsubenumlabel.\insertsubsubenumlabel}
213 \defbeamertemplate*{enumerate mini template}{default}{\insertenumlabel}
214
215
216 % Description item, default
217
218 \defbeamertemplate*{description item}{default}{\insertdescriptionitem}
219
220
221 % Itemize/Enumerate body
222
223 \defbeamertemplate*{itemize/enumerate body begin}{default}{}
224 \defbeamertemplate*{itemize/enumerate body end}{default}{}
225
226 \defbeamertemplate*{itemize/enumerate subbody begin}{default}{}
227 \defbeamertemplate*{itemize/enumerate subbody end}{default}{}
228
229 \defbeamertemplate*{itemize/enumerate subsubbody begin}{default}{}
230 \defbeamertemplate*{itemize/enumerate subsubbody end}{default}{}
231
232 % Description body
233
234 \defbeamertemplate*{description body begin}{default}{}
235 \defbeamertemplate*{description body end}{default}{}
236
237
238 % Alerted text
239
240 \defbeamertemplate*{alerted text begin}{default}{%
241 \setbeamercolor{local structure}{parent=alerted text}%
242 \setbeamercolor{item}{fg=alerted text.fg}%
243 }
244
245 % Structured text
246
247 % empyt defaults
248
249
250 % Bibliography items
251
252 \defbeamertemplate*{bibliography item}{default}
253 {\lower3.5pt\hbox{\hskip2pt\pgfuseimage{beamericonarticle}\hskip1pt}}
254
255 \defbeamertemplate*{bibliography entry article}{default}{}
256 \defbeamertemplate*{bibliography entry title}{default}{\par}
257 \defbeamertemplate*{bibliography entry location}{default}{\par}
258 \defbeamertemplate*{bibliography entry note}{default}{\par}
259
260
261 % Buttons
262
263 \newdimen\beamer@dima%
264 \newdimen\beamer@dimb%
265
266 \defbeamertemplate*{button}{default}
267 {%
268 \setbox\beamer@tempbox=\hbox{{\insertbuttontext}}%
269 \ht\beamer@tempbox=6pt%
270 \dp\beamer@tempbox=0pt%
271 \setbox\beamer@tempbox=\vbox{\box\beamer@tempbox\vskip2pt}%
272 \beamer@tempdim=\wd\beamer@tempbox%
273 \beamer@dima=\beamer@tempdim\advance\beamer@dima by2.2pt
274 \beamer@dimb=\beamer@tempdim\advance\beamer@dimb by4pt
275 \begin{pgfpicture}{-4pt}{0pt}{\the\beamer@tempdim}{8pt}
276 \color{bg}
277 \pgfsetlinewidth{0.8pt}
278 \pgfpathqmoveto{0pt}{0pt}
279 \pgfpathqcurveto{-2.2pt}{0pt}{-4pt}{1.8pt}{-4pt}{4pt}
280 \pgfpathqcurveto{-4pt}{6.2pt}{-2.2pt}{8pt}{0pt}{8pt}
281 \pgfpathlineto{\pgfpoint{\the\beamer@tempdim}{8pt}}
282 \pgfpathcurveto%
283 {\pgfpoint{\the\beamer@dima}{8pt}}%
284 {\pgfpoint{\the\beamer@dimb}{6.2pt}}%
285 {\pgfpoint{\the\beamer@dimb}{4pt}}
286 \pgfpathcurveto%
287 {\pgfpoint{\the\beamer@dimb}{1.8pt}}%
288 {\pgfpoint{\the\beamer@dima}{0pt}}%
289 {\pgfpoint{\the\beamer@tempdim}{0pt}}
290 \pgfpathclose
291 \pgfusepathqfill
292 \colorlet{bg}{parent.bg}
293 \usebeamercolor[fg]{button border}
294 \pgfpathqmoveto{0pt}{0pt}
295 \pgfpathqcurveto{-2.2pt}{0pt}{-4pt}{1.8pt}{-4pt}{4pt}
296 \pgfpathqcurveto{-4pt}{6.2pt}{-2.2pt}{8pt}{0pt}{8pt}
297 \pgfpathlineto{\pgfpoint{\the\beamer@tempdim}{8pt}}
298 \pgfpathcurveto%
299 {\pgfpoint{\the\beamer@dima}{8pt}}%
300 {\pgfpoint{\the\beamer@dimb}{6.2pt}}%
301 {\pgfpoint{\the\beamer@dimb}{4pt}}
302 \pgfpathcurveto%
303 {\pgfpoint{\the\beamer@dimb}{1.8pt}}%
304 {\pgfpoint{\the\beamer@dima}{0pt}}%
305 {\pgfpoint{\the\beamer@tempdim}{0pt}}
306 \pgfpathclose
307 \pgfusepathqstroke
308 \end{pgfpicture}%
309 \hskip-\beamer@tempdim%
310 \box\beamer@tempbox%
311 \kern4pt%
312 }
313
314
315 % Abstract
316
317 \defbeamertemplate*{abstract title}{default}
318 {%
319 \begin{center}%
320 \abstractname
321 \end{center}%
322 }
323
324 \defbeamertemplate*{abstract begin}{default}
325 {\beamercolorbox[vmode]{abstract}\leftskip2em\rightskip2em plus 1fill\usebeamerfont*{abstract}}
326
327 \defbeamertemplate*{abstract end}{default}
328 {\medskip\endbeamercolorbox}
329
330
331 % Verse
332
333 \defbeamertemplate*{verse begin}{default}
334 {\beamercolorbox[vmode]{verse}}
335
336 \defbeamertemplate*{verse end}{default}
337 {\endbeamercolorbox}
338
339
340 % Quotation
341
342 \defbeamertemplate*{quotation begin}{default}
343 {\beamercolorbox[vmode]{quotation}}
344
345 \defbeamertemplate*{quotation end}{default}
346 {\endbeamercolorbox}
347
348
349 % Quote
350
351 \defbeamertemplate*{quote begin}{default}
352 {\beamercolorbox[vmode]{quote}}
353
354 \defbeamertemplate*{quote end}{default}
355 {\endbeamercolorbox}
356
357
358 % Footnotes
359
360 \defbeamertemplate*{footnote}{default}
361 {
362 \parindent 1em\noindent%
363 \raggedright
364 \hbox to 1.8em{\hfil\insertfootnotemark}\insertfootnotetext\par%
365 }
366
367
368 % Captions
369
370 \defbeamertemplate*{caption}{default}
371 {%
372 \raggedright
373 {%
374 \usebeamercolor[fg]{caption name}%
375 \usebeamerfont*{caption name}%
376 \insertcaptionname
377 \usebeamertemplate{caption label separator}%
378 }%
379 \insertcaption\par
380 }
381 \defbeamertemplate*{caption label separator}{default}{:\ }
382
383 % Blocks
384
385 \defbeamertemplateparent{blocks}{block begin,block end,%
386 block alerted begin,block alerted end,%
387 block example begin,block example end}
388 {}
389
390 \defbeamertemplate*{block begin}{default}[1][]
391 {
392 \par\vskip\medskipamount%
393 \begin{beamercolorbox}[colsep*=.75ex,#1]{block title}
394 \usebeamerfont*{block title}\insertblocktitle%
395 \end{beamercolorbox}\noframebreak%
396 {\parskip0pt\par}%
397 \ifbeamercolorempty[bg]{block title}
398 {}
399 {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
400 \usebeamerfont{block body}%
401 \begin{beamercolorbox}[colsep*=.75ex,vmode,#1]{block body}%
402 \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
403 }
404 \defbeamertemplate*{block end}{default}
405 {\end{beamercolorbox}\vskip\smallskipamount}
406
407 \defbeamertemplate*{block alerted begin}{default}[1][]
408 {
409 \par\vskip\medskipamount%
410 \begin{beamercolorbox}[colsep*=.75ex,#1]{block title alerted}
411 \usebeamerfont*{block title alerted}\insertblocktitle%
412 \end{beamercolorbox}\noframebreak%
413 {\parskip0pt\par}%
414 \ifbeamercolorempty[bg]{block title alerted}
415 {}
416 {\ifbeamercolorempty[bg]{block body alerted}{}{\nointerlineskip\vskip-0.5pt}}%
417 \usebeamerfont{block body alerted}%
418 \begin{beamercolorbox}[colsep*=.75ex,vmode,#1]{block body alerted}%
419 \ifbeamercolorempty[bg]{block body alerted}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
420 }
421
422 \defbeamertemplate*{block alerted end}{default}
423 {\end{beamercolorbox}\vskip\smallskipamount}
424
425 \defbeamertemplate*{block example begin}{default}[1][]
426 {
427 \par\vskip\medskipamount%
428 \begin{beamercolorbox}[colsep*=.75ex,#1]{block title example}
429 \usebeamerfont*{block title example}\insertblocktitle%
430 \end{beamercolorbox}\noframebreak%
431 {\parskip0pt\par}%
432 \ifbeamercolorempty[bg]{block title example}
433 {}
434 {\ifbeamercolorempty[bg]{block body example}{}{\nointerlineskip\vskip-0.5pt}}%
435 \usebeamerfont{block body example}%
436 \begin{beamercolorbox}[colsep*=.75ex,vmode,#1]{block body example}%
437 \ifbeamercolorempty[bg]{block body example}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
438 }
439 \defbeamertemplate*{block example end}{default}
440 {\end{beamercolorbox}\vskip\smallskipamount}
441
442
443
444
445 % Theorems
446
447 \defbeamertemplateparent{theorems}{theorem begin,theorem end}
448 {}
449
450 \defbeamertemplate*{theorem begin}{default}
451 {%
452 \begin{\inserttheoremblockenv}
453 {%
454 \inserttheoremname
455 \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
456 }%
457 }
458
459 \defbeamertemplate*{theorem end}{default}
460 {\end{\inserttheoremblockenv}}
461
462
463 % Proofs
464 \defbeamertemplate*{proof begin}{default}
465 {\begin{block}{\insertproofname}}
466
467 \defbeamertemplate*{proof end}{default}
468 {\end{block}}
469
470 \defbeamertemplate*{qed symbol}{default}
471 {\openbox}
472
473
474
475
476 \mode
477 <all>