summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.tex
blob: c389f6479e5ccfd89100563a94ab20551058e0ab (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
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
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
% Copyright (C) 2022 by Maxime CHUPIN
% <chupin at ceremade.dauphine.fr>
% -------------------------------------------------------
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
%  Author: Maxime CHUPIN
%          chupin at ceremade.dauphine.fr
%
%  This work has the LPPL maintenance status "author-maintained".

\documentclass[10pt,aspectratio=169,english]{beamer}
%\usepackage[charter]{mathdesign}
\usepackage{xcharter-otf}
\usepackage{hologo}
\usepackage{luamesh}

\usepackage{babel}
\usepackage{pgfpages}
\usepackage{tcolorbox}
\usepackage{biblatex}
\usepackage{cleveref}
% \hypersetup{colorlinks=true}

\tcbuselibrary{listings,breakable}
\tcbuselibrary{documentation}
\tcbset{
  color command=AmurmapleRed,
  color environment=AmurmapleRed,
  color option=AmurmapleGreen
}
\usetheme[
%nogauge,
nomail,
delaunay,
%amurmapleblue
]{Amurmaple}

\lstset{
  numberstyle=\footnotesize\color{gray},
  keywordstyle=\ttfamily\bfseries\color{structure},
  basicstyle=\ttfamily\normalsize,
  commentstyle=\itshape\color{gray},
  stringstyle=\ttfamily,
  showstringspaces=false,
  language=[LaTeX]TeX,
  breaklines=true,
  breakindent=30pt,
  defaultdialect=[LaTeX]TeX,
  morekeywords={usetheme,definecolor, beamerbutton, beamerskipbutton,
    beamerreturnbutton, structure, alert, sectionpage, mail, webpage,
    collaboration, subtitle, institute, titlegraphic, sepframe, includegraphics,
    thanksframe, inserttitlegraphic, framesection, boxalert,appendix,logo}
  % frame=tb
}


\newtcblisting{Code}{%
  arc=0pt,outer arc=0pt,
  colback=structure!3,
  colframe=structure,
  breakable,
  boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle =
  3pt, toptitle=3pt,
  boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, toprule at break =
  0pt, bottomrule at break = 0pt,
  listing options={breaklines,basicstyle=\ttfamily},listing only,
}

\newtcblisting{Exemple}{%
  arc=0pt,outer arc=0pt,
  colback=structure!3,
  colframe=structure,
  breakable,
  boxsep=0pt,left=3pt,right=3pt,top=2pt,bottom=2pt, bottomtitle =
  0pt, toptitle=0pt,
  boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, toprule at break =
  0pt, bottomrule at break = 0pt,
  listing options={breaklines,basicstyle=\ttfamily},
}

\newtcblisting{CodePreambule}{%
  arc=0pt,outer arc=0pt,
  colback=AmurmapleBlue!5,
  colframe=AmurmapleBlue,
  breakable,
  boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle =
  3pt, toptitle=3pt,
  boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, toprule at break =
  0pt, bottomrule at break = 0pt,
  enhanced,
  overlay  ={%
    \node[ minimum width=1cm,
      anchor=south east,yshift=-0cm,fill=AmurmapleBlue] at (frame.south east)
      {\itshape\color{white} preamble};
      % \node[ minimum width=1cm,
      % anchor=south east,yshift=-0cm,color=gray,opacity=0.7] at (frame.south east)
      % {\itshape\small préambule};
  },
  listing options={
    breaklines,
    basicstyle=\ttfamily,
  },listing only,
}




\title[Amurmaple documentation]{Amurmaple Beamer Theme}
\author[M.~Chupin]{Maxime Chupin}
\subtitle{documentation\quad v.1.1}
\institute[CNRS]{CNRS\\
University of Paris-Dauphine}
\date{September 10, 2022}
\titlegraphic{\includegraphics[width=4cm]{logo.png}}
\mail{chupin@ceremade.dauphine.fr}
\webpage{www.ceremade.dauphine.fr/~chupin/}
\collaboration{in collaboration with Beamer and \hologo{LaTeX3}}

\bibliography{biblio.bib}
\usefonttheme{serif}






\begin{document}

\maketitle

\sepframe[title={Table of contents}]
\section{Introduction}

\begin{frame}{Introduction}
\begin{information}
This Beamer theme is  a suitable theme for my use of Beamer in applied
mathematics research.

It meets my needs in my work. However, if you like this theme, and if you want
to ask for or make improvements, don't hesitate to write to me !

Obviously, we refer to the documentation of the Beamer class for details, and we
will assume in this little documentation that the reader is familiar with the
Beamer class.
\end{information}
Thanks to Denis Bitouzé for the tests and recommendations to improve this
theme.
\end{frame}


\section{How to use it}

\sepframe

\begin{frame}[fragile]{How to use Amurmaple theme}
  \begin{itemize}
  \item The Amurmaple beamer theme consists in the file
    \texttt{beamerthemeAmurmaple.sty} that you can put in your local
    \texttt{\~{}/texmf/tex/latex/contrib/beamer-contrib/themes/beamer-amurmaple}
    directory.
  \item Simply add in your preamble\footnote{Note that the listing environments
      of this document are not provided by Amurmaple theme.}
    \begin{CodePreambule}
\documentclass{beamer}
\usetheme{Amurmaple}
\end{CodePreambule}
\item This theme depends on the following packages:
  \begin{multicols}{2}
  \begin{itemize}
  \item \lstinline+tcolorbox+;
  \item \lstinline+multicol+;
  \item \lstinline+xparse+;
  \item \lstinline+xfp+;
  \item \lstinline+expl3+;
  \item \lstinline+iftex+.
  \end{itemize}
\end{multicols}
\end{itemize}
\end{frame}

\subsection{Theme Options}

\begin{frame}[fragile,allowframebreaks]{Theme Options}
  There are some options available :
  \begin{description}
  \item[nogauge:] that suppresses the gauge at the top of the vertical side bar
    of the current slide ;
  \item[nomail:] that suppresses the mail in the vertical side bar of
    the current slide ;
  \item[delaunay:] that produces a Delaunay mesh of random points in
    the ``structure'' slides (title, section, etc.). \alert{This option can only be
      used with \hologo{LuaLaTeX}} and depends on the
    package~\lstinline{luamesh}\footfullcite{Luamesh};
    \framebreak
  \item[sidebar:] that provides a \emph{sidebar} as shown below\footnote{In
      general, we strongly recommend the use of the \texttt{aspectratio=169} option of
      beamer, but even more strongly with the \texttt{sidebar} option.}.
    \begin{center}
      \includegraphics[width=0.5\linewidth,page=13]{beamer-amurmaple-sidebar}
    \end{center}
    \item[sidebarwidth=\meta{value} (with dimension):] when using the sidebar option, you can
      adjust the sidebar width (default 58pt).
      \framebreak
    \item[rule:] that add a rule between the color areas in the different
      slides:  title (see p.~\cref{title}), section and part (see p.~\ref{sectionpart}),
      \lstinline+sepframe+ frame(see p.~\ref{sepframe}), thanks frame (see p.~\ref{thanks}), as
      well as classical slides, between the left bar (sidebar or not) and the
      text area.
      \begin{center}
        \includegraphics[width=0.4\linewidth,page=1]{beamer-amurmaple-test}\quad\includegraphics[width=0.4\linewidth,page=4]{beamer-amurmaple-test}
        \par\itshape Examples using the \lstinline+rule+ option.
      \end{center}
    \item[rulecolor=\meta{color}:] that allows to choose the color for the
      rule of the \lstinline+rule+ option (default black).
    \item[leftframetitle:] that aligns the \lstinline+frametitle+ to the left of
      the slide.
      \framebreak
    \item[amurmapleblue:] that changes the main color (\lstinline+structure+) to a
    certain blue (see slide~\ref{sl:color}) ;
  \item[amurmaplegreen:] that changes the main color (\lstinline+structure+) to a
    certain green (see slide~\ref{sl:color});
  \end{description}
  For example, these slides are produced with the following call\footnote{We use
  the \emph{Bitstream Charter} font family provided by the package
  \emph{Xcharter-Math}  with the serif Beamer theme. \fullcite{xcharter-math}.}:
  \begin{CodePreambule}
\usetheme[nomail,delaunay]{Amurmaple}
  \end{CodePreambule}
\end{frame}



\section{Classical Beamer Tools}
\sepframe
\subsection{Colors}

\begin{frame}[fragile, allowframebreaks]{Colors of the theme}
  This theme provides some colors :
  \begin{Code}
\definecolor{AmurmapleRed}{rgb}{0.6,0.,0.}
\definecolor{AmurmapleOrange}{RGB}{230,108,17}
\definecolor{AmurmapleBlue}{RGB}{55,119,231}
\definecolor{AmurmapleGreen}{rgb}{0.1,0.4,0.1}
\end{Code}

\textcolor{AmurmapleRed}{\lstinline+AmurmapleRed+} is used to redefine the \lstinline+structure+
Beamer color\footnote{So if you redefine the \lstinline+structure+ color, the Amurmaple
theme should change correctly.}, \textcolor{AmurmapleOrange}{\lstinline+AmurmapleOrange+} is used to redefine
the \lstinline+text alerted+ Beamer color, \textcolor{AmurmapleGreen}{\lstinline+AmurmapleGreen+} is
used for the math definition (see slide~\ref{sl:definition}) and for the
\lstinline+block title example+ Beamer color, and the
\textcolor{AmurmapleBlue}{\lstinline+AmurmapleBlue+} for the new environnement
\lstinline+information+ (see slide~\ref{sl:information}).
\framebreak

\framesection{Color Theme Option}\label{sl:color}

This theme provides two theme options to change the color settings:
\begin{description}
\item[amurmapleblue] that sets \texttt{AmurmapleBlue!80!black} as \texttt{structure}
  color ;
\item[amurmaplegreen] that sets \texttt{AmurmapleGreen!80!black} as \texttt{structure}
  color.
\end{description}
In fact, internally, four colors are defined: \lstinline+Amurmaple@structure+,
\lstinline+Amurmaple@alert+, \lstinline+Amurmaple@info+ and
\lstinline+Amurmaple@example+.

The color theme option is used as follow
\begin{Code}
  \usetheme[amurmapleblue]{amurmaple}
\end{Code}
\end{frame}

\subsection{Classical commands}

\begin{frame}[fragile]{Classical Beamer Commands}
  \framesubtitle{Customization}
  \framesection{Beamer buttons}
  \begin{Exemple}
\beamerbutton{Button}~\beamerskipbutton{Skip Button}~\beamerreturnbutton{Return}
\end{Exemple}
\framesection{Alert and structure commands}
\begin{Exemple}
\structure{Test structure} \alert{Test alert}
\end{Exemple}
\end{frame}

\begin{frame}[fragile]{Results of \texttt{$\backslash$tableofcontents}}
  \tableofcontents
\end{frame}

\subsection{Classical environnement}

\begin{frame}[allowframebreaks,fragile]{Classical Beamer environments}
  \framesection{Block environments}
  \begin{block}{Block}
    Test of the \lstinline+\begin{block}...\end{block}+ Beamer environment.
  \end{block}
  \begin{alertblock}{Alert Block}
    Test of the \lstinline+\begin{alertblock}...\end{alertblock}+ Beamer environment.
  \end{alertblock}
  \begin{exampleblock}{Example Block}
    Test of the \lstinline+\begin{exampleblock}...\end{exampleblock}+ Beamer environment.
  \end{exampleblock}

  \framebreak

\framesection{Abstract environment}

  \begin{abstract}
    This is the result of the \lstinline+\begin{abstract}...\end{abstract}+
    environment.
  \end{abstract}

  \framesection{Quotation environment}

  The environment \lstinline+\begin{quotation}[+\meta{author(s)}\lstinline+]...\end{quotation}+ has been
  redefined allowing an optional argument to provide the author(s) of the
  quotation.

  \begin{quotation}[Donald E. Knuth, \emph{The \TeX book}]
Gentle reader: This is a handbook about \TeX, a new typesetting system G
intended for the creation of beautiful books—and especially for books that
contain a lot of mathematics.
\end{quotation}

\framebreak
\framesection{Lists}

The style of the standard enumerate and itemize lists has been modified as you
can see below

\begin{multicols}{2}
  \begin{itemize}
\item Eggs
\item Plants
  \begin{itemize}
  \item Flowers
  \end{itemize}
\item Animals
\end{itemize}
\columnbreak
\begin{enumerate}
\item Eggs
\item Plants
\item Animals
  \begin{enumerate}
  \item Dogs
  \item Cats
  \end{enumerate}
\end{enumerate}
\end{multicols}
\end{frame}


\subsection{Section and Part Frames}

\newsavebox{\codebox}% To store any verbatim content
\begin{lrbox}{\codebox}
  \begin{Code}
\begin{frame}
\sectionpage
\end{frame}

%\begin{frame}
%\partpage
%\end{frame}
\end{Code}
\end{lrbox}

\begin{frame}[fragile]{Section and Part Frames}\label{sectionpart}
  The standard \texttt{section page} and \texttt{part page} have been modified.

  The following code produce the next slide (the part slide is not generated
  because this document does not use part sectionning).

  \usebox{\codebox}

\end{frame}

\begin{frame}
\sectionpage
\end{frame}

\subsection{Maths}

\begin{frame}[fragile,allowframebreaks]{Maths environnement}
  \begin{itemize}
  \item \lstinline+\begin{theorem}+\oarg{Title of th. (optional)}\lstinline+...\end{theorem}+
    \begin{theorem}[Title of th. (optional)]
      There exists an infinite set.
    \end{theorem}
  \item \lstinline+\begin{example}...\end{example}+
    \begin{example}
      The set of natural numbers is infinite.
    \end{example}
  \item \lstinline+\begin{definition}+\oarg{Title of def. (optional)}\lstinline+...\end{definition}+\label{sl:definition}
    \begin{definition}[Title of def. (optional)]
      A simple definition.
    \end{definition}
    \framebreak
  \item \lstinline+\begin{corollary}+\oarg{Title of corollary (optional)}\lstinline+...\end{corollary}+
    \begin{corollary}[Title of corollary (optional)]
      A simple corollary.
    \end{corollary}
  \item \lstinline+\begin{proof}...\end{proof}+
    \begin{proof}
      This follows from the axiom of infinity.
    \end{proof}
  \end{itemize}
\end{frame}



\section{Title Page}

\sepframe

\begin{frame}[fragile,allowframebreaks]{Title Page}\label{title}
  As shown in this document, the title page has been customized.
  In addition to the classic commands for making the title page, the Amurmaple
  theme provides new commands.

  The new commands are :
  \begin{itemize}
  \item \lstinline+\mail+\marg{mail}: that is used to provide the mail. Without the theme option
    \lstinline+nomail+, it is also added on the vertical side bar on the current
    slide.
  \item \lstinline+\webpage+\marg{webpage}: that is used to provide the personal webpage of
    the speaker (or the project website).
  \item \lstinline+\collaboration+\marg{collaboration(s)}: that is used to provide the collaborators
    for the presented work.
  \end{itemize}

  The \lstinline+\logo+ command can be used to add a logo to each slide. In the
  standard theme, the logo is put in the bottom right corner of the slide, just
  above the page numbering. When the option \lstinline+sidebar+, the logo is put
  a the bottom of the side bar (above the gauge if it is used).

  \framebreak

  Here the example used to generate this documentation.
  \begin{Code}
\title[Amurmaple documentation]{Amurmaple Beamer Theme}
\author[M.~Chupin]{Maxime Chupin}
\subtitle{documentation}
\institute[CNRS]{CNRS\\
University of Paris-Dauphine}
\date{Mai 08, 2022}
\titlegraphic{\includegraphics[width=4cm]{logo.png}}
\mail{chupin@ceremade.dauphine.fr}
\webpage{www.ceremade.dauphine.fr/~chupin/}
\collaboration{in collaboration with Beamer and \hologo{LaTeX3}}
\end{Code}

\end{frame}

\section{New Frame Commands}

\sepframe

\begin{frame}[fragile]{\texttt{sepframe} command}\label{sepframe}
\bigskip
\begin{docCommand}{sepframe}{\oarg{title=\meta{mytitle},image=\meta{my image}}}
The newcommand \lstinline+\sepframe+ is provided by the Amurmaple theme. This
command allows you to generate a slide in the manner of a section page but with
a slight improvement. In the red part below is generated the table of contents
(with depth 1).

Moreover, this command admits two optional arguments:
\begin{description}
\item[title:] this optional argument allows to modify the default title of the
  frame (which is the current section name) ;
\item[image:] this optional argument allows to add an image to the frame (no
  image by default).
\end{description}

\end{docCommand}



For exemple, we could use
\begin{Code}
\sepframe[title={My title},image={\includegraphics[width=5cm]{logo.png}}]
\end{Code}

The result is the next frame.
\end{frame}

\sepframe[title={My  title},image={\includegraphics[width=5cm]{logo.png}}]

\begin{frame}[fragile]{\texttt{thanksframe} command}\label{thanks}

  \begin{docCommand}{thanksframe}{\marg{thanking message}}
  The newcommand \lstinline+\thanksframe+ is provided by the Amurmaple
  theme. This command allows you to generate a slide  to thank the audience.
  The text written to thank is a mandatory argument (e.g. ``\emph{The end}'')
  and the optional argument allows to change the default image which is the
  \emph{title graphics} (\lstinline+\inserttitlegraphic+ exactly).
\end{docCommand}
The following code produces the next slide.
  \begin{Code}
\thanksframe{Merci beaucoup~!}
  \end{Code}
\end{frame}

\thanksframe{Merci beaucoup~!}

\section{New Commands and Environments}

\begin{frame}[fragile,allowframebreaks]{Some New Commands and Environments}
  The Amurmaple theme provides some other commands and environments.

  \framesection{New Commands}

  \begin{docCommand}{framesection}{\marg{text}}
    Command to add a section title inside a frame.

    The following example produced the previous frame sectioning \emph{New Commands}
    \begin{Code}
\framesection{New Commands}
\end{Code}
\end{docCommand}
\begin{docCommand}{boxalert}{\marg{text}}
Another \lstinline+\alert+ command with a colored box.
  \begin{Exemple}
\boxalert{This is another} command box to compare to \alert{this one}.
  \end{Exemple}
\end{docCommand}
\framebreak

\framesection{New Environments}
{\itshape \structure{Note:} Each environment provided by the Amurmaple theme uses
translations for title names. Hence, depending on the \texttt{babel} setting,
\emph{Remark} becomes \emph{Remarque, Bemerkung,}\dots}

\begin{docEnvironment}{information}{\oarg{changed title}}
 The Amurmaple theme provides an information environment.\label{sl:information}
  \begin{Code}
\begin{information}
  This is important information.
\end{information}
  \end{Code}
  \begin{information}
    This is an important information.
  \end{information}

  This environment has an optional argument to change the \emph{Information}
  title.
  \begin{Code}
\begin{information}[More information]
  Maybe more important information?
\end{information}
\end{Code}

\begin{information}[More information]
  Maybe more important information?
\end{information}
Because this environment is built with a \texttt{tcolorbox}, to use a footnote in it, you have to use \lstinline+\footnote[frame]{...}+.
\end{docEnvironment}

\begin{docEnvironment}{remark}{\oarg{title complement}}
The Amurmaple theme provides a remark environment with an optional
  argument to add a comment in the title (as for the theorem environment).
  \begin{Code}
\begin{remark}[Some complement]
  This is a capital remark.
\end{remark}
\end{Code}
\begin{remark}[Some complement]
  This is a capital remark.
\end{remark}

Because this environment is built with a \texttt{tcolorbox}, to use a footnote in it, you have to use \lstinline+\footnote[frame]{...}+.
\end{docEnvironment}

\end{frame}

\appendix

\section{Appendix}

\sepframe

\begin{frame}[fragile]{Appendix}
  In the appendix part of the document, (after the command
  \lstinline+\appendix+) the display is slightly modified as you
  can see in this slide. If the gauge exists, it disappears, the numbering
  of slides is reset and the display is in roman form.
\end{frame}


\thanksframe{The end!}



\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: