summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/beamertheme-light/beamertheme-light.sty
blob: c2ceecc4b4a2e37ec43c4fa1e20055d00c399955 (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
%%%%% Package ``beamertheme-light'': a colored beamer theme %%%%%
%%%%% Authors: Fabien Vergnet and Vivien Goepp %%%%%
%%%%% Contact: f.j.vergnet@gmail.com and vivien.goepp@gmail.com %%%%%
%%%%% Package version 1.0 (29/01/2019) %%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{light}[2019/01/29 Beamer style package]

\mode<presentation>

%%%%% Define colors %%%%%
% Defaut:
\definecolor{vertfonce}{rgb}{0.20,0.43,0.09} 
% Blue:
\definecolor{frenchblue}{rgb}{0.0, 0.45, 0.73}
\definecolor{sanddune}{rgb}{0.59, 0.44, 0.09}
% Purple:
\definecolor{darkmagenta}{rgb}{0.55, 0.0, 0.55}
\definecolor{byzantium}{rgb}{0.44, 0.16, 0.39}
\definecolor{sanddune}{rgb}{0.59, 0.44, 0.09}
% Beige:
\definecolor{darkpastelred}{rgb}{0.76, 0.23, 0.13}
\definecolor{desertsand}{rgb}{0.93, 0.79, 0.69}

%%%%% Define body and title colors %%%%%
%% Foreground colors
\newcommand{\wordcolor}{vertfonce} % Text color
%% Optional colors
\DeclareOption{blue}{\renewcommand{\wordcolor}{frenchblue}}
\DeclareOption{red}{\renewcommand{\wordcolor}{darkpastelred}}
\DeclareOption{purple}{\renewcommand{\wordcolor}{darkmagenta}}
\DeclareOption*{\PackageWarning{descartes}{Unknown ‘\CurrentOption’}}
\ProcessOptions\relax

%% Background colors
\newcommand{\strbg}{white!90!black} % Structure background color
\DeclareOption{blue}{\renewcommand{\strbg}{sanddune!15!white}}
\DeclareOption{red}{\renewcommand{\strbg}{desertsand!30!white}}
\DeclareOption{purple}{\renewcommand{\strbg}{byzantium!25!white}}
\DeclareOption*{\PackageWarning{descartes}{Unknown ‘\CurrentOption’}}
\ProcessOptions\relax

%% Set colors
\setbeamercolor{title in head/foot}{fg=\wordcolor,bg=white!90!black}
\setbeamercolor{structure}{fg=\wordcolor,bg=\strbg}
\setbeamercolor{title}{fg=\wordcolor,bg=white}

%%%%% Define title frame %%%%%
\defbeamertemplate*{title page}{customized}[1][]
{
  \vspace{1cm}
  \usebeamerfont{title}\usebeamercolor[fg]{title}\center{\huge \inserttitle}\par
   \center{\rule{0.6666\paperwidth}{0.02cm}\par}
  \bigskip
  \usebeamerfont{author}\usebeamercolor[black]{author}{\large \insertauthor}\\
  \bigskip
  \usebeamerfont{institute}{\small \insertinstitute}\par
  \bigskip
  \vspace{1cm}
  \usebeamerfont{date}{\small \insertdate}\par
}
%%%%% End define title frame %%%%%

%%%%% Define footline %%%%%
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd =.45\paperwidth, ht = 2.25ex, dp = 1ex, center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\colorbox{structure.bg}{\makebox[0.45\paperwidth]{\insertshortauthor}}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd =.45\paperwidth, ht = 2.25ex, dp = 1ex, center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\colorbox{structure.bg}{\makebox[0.45\paperwidth]{\insertshorttitle}}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.10\paperwidth, ht = 2.25ex, dp = 1ex, right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\colorbox{structure.bg}{\makebox[0.10\paperwidth]{
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}}}
  \end{beamercolorbox}}%
  \vskip0pt%
}
%%%%% End define footline %%%%%

%%%%% Define command for the "Thank you" frame
\newcommand{\thankframe}[1]{
\setbeamercolor{background canvas}{fg = title.fg,bg = title.fg!50!black}
\setbeamertemplate{footline}{}
\begin{frame}
	\center{\Huge \textcolor{white}{#1}}
\end{frame}
\setbeamercolor{structure}{fg = \wordcolor, bg = \strbg}
\setbeamercolor{background canvas}{fg = black,bg = white}
}
%%%%% End define command for the "Thank you" frame

%% Rounded block (for definition, prop, theorems, etc...)
\setbeamertemplate{blocks}[rounded][shadow = true]

%% No navigation symbols
\setbeamertemplate{navigation symbols}{}

%% Redefine itemize
\setbeamercolor{item}{fg = title.fg, bg = title.fg}
\setbeamertemplate{itemize item}{{\tiny{\textbullet}}}

%% Redefine the way the legend of a figure is written
\setbeamertemplate{caption}{\raggedright\scriptsize{\insertcaption}\par}

%% To have "[number]" before any reference in bibliography
\setbeamertemplate{bibliography item}[text]

%% Remove 1 from the counter (title frame is 0)
\addtocounter{framenumber}{-1}

\mode
<all>