Merge remote-tracking branch 'origin/master'
[hacks/latex/beamer-upsud.git] / beamerthemeUpsud.sty
1
2
3 \mode<presentation>
4
5 \RequirePackage{tikz}
6 \usetikzlibrary{calc}
7 \usetikzlibrary{backgrounds}
8 %%% colors
9 \definecolor{upsblue}{HTML}{005480}
10 \definecolor{upsdarkblue}{HTML}{003a58}
11 \definecolor{upsgreen}{RGB}{146, 185, 56}
12
13 \definecolor{upsdarkgray}{RGB}{30, 29, 28}
14 \definecolor{upsgray}{RGB}{110, 110, 109}
15 \definecolor{upslightgray}{RGB}{155, 155, 155}
16
17
18 \setbeamercolor{title}{fg = white, bg=upsblue}
19 \setbeamercolor{frametitle}{fg = white}
20 \setbeamercolor{item}{fg = upsgray}
21 \setbeamercolor{subitem}{fg = upsgray}
22 \setbeamercolor{subsubitem}{fg = upsgray}
23 \setbeamercolor{description item}{fg = upsgreen}
24
25 \setbeamercolor{normal text}{fg = upsgray}
26 \setbeamercolor{alerted text}{fg = upsgreen}
27
28
29 \setbeamercolor{section in toc}{fg=upsblue, bg=white}
30 \setbeamercolor{}{}
31
32 %%% font options
33
34
35 \setbeamerfont{normal text}{} % ignored currently
36 \setbeamerfont{alerted text}{family=\bf}
37 \setbeamerfont{block title example}{family=\bf}
38 \setbeamercolor{block title example}{fg=white, bg=upsblue}
39 \setbeamercolor{block body example}{fg=upsgray, bg=upsblue!10}
40
41 \setbeamerfont{block title}{family=\bf}
42 \setbeamercolor{block title}{fg=white, bg=upsgreen}
43 \setbeamercolor{block body}{fg=upsgray, bg=upsgreen!10}
44
45 \setbeamerfont{structure}{}
46 \setbeamerfont{tiny structure}{size=\tiny}
47
48 \setbeamerfont{title}{size=\tiny,parent=structure}
49 \setbeamerfont{title in head/foot}{}
50 \setbeamerfont{title in sidebar}{size=\tiny}
51
52 \setbeamerfont{subtitle}{size=\normalsize,parent=title}
53
54 \setbeamerfont{author}{size=\small}
55 \setbeamerfont{author in head/foot}{}
56 \setbeamerfont{author in sidebar}{size=\tiny}
57
58 \setbeamerfont{institute}{size=\small}
59 \setbeamerfont{institute in head/foot}{}
60 \setbeamerfont{institute in sidebar}{}
61
62 \setbeamerfont{date}{}
63 \setbeamerfont{date in head/foot}{}
64 \setbeamerfont{date in sidebar}{}
65
66 \setbeamerfont{part name}{size=\LARGE}
67 \setbeamerfont{part title}{size=\LARGE,parent=title}
68
69 \setbeamerfont{section name}{size=\Large}
70 \setbeamerfont{section title}{size=\Large,parent=title}
71
72 \setbeamerfont{section in toc}{parent=structure}
73 \setbeamerfont{section in toc shaded}{parent=section in toc}
74 \setbeamerfont{section in head/foot}{}
75 \setbeamerfont{section in sidebar}{size=\tiny}
76 \setbeamerfont{section number projected}{size=\small,parent={section in toc,projected text}}
77
78 \setbeamerfont{subsection name}{size=\large}
79 \setbeamerfont{subsection title}{size=\large,parent=title}
80
81 \setbeamerfont{subsection in toc}{}
82 \setbeamerfont{subsection in toc shaded}{parent=subsection in toc}
83 \setbeamerfont{subsection in head/foot}{}
84 \setbeamerfont{subsection in sidebar}{}
85
86 \setbeamerfont{subsubsection in toc}{size=\footnotesize}
87 \setbeamerfont{subsubsection in toc shaded}{parent=subsubsection in toc}
88 \setbeamerfont{subsubsection in head/foot}{}
89 \setbeamerfont{subsubsection in sidebar}{}
90
91 \setbeamerfont{headline}{parent={tiny structure}}
92 \setbeamerfont{footline}{parent={tiny structure}}
93
94 \setbeamerfont{sidebar}{size=\Tiny,parent={tiny structure}}
95 \setbeamerfont{sidebar left}{parent=sidebar}
96 \setbeamerfont{sidebar right}{parent=sidebar}
97
98 \setbeamerfont{frametitle}{parent=structure,size=\Large,series=\bfseries}
99 \setbeamerfont{framesubtitle}{parent=frametitle,size=\scriptsize,series=\it,family=\it}
100
101 \setbeamerfont{caption}{size=\small}
102 \setbeamerfont{caption name}{parent={structure,caption}}
103
104 \setbeamerfont{button}{size=\tiny}
105
106 \setbeamerfont{block body}{}
107 \setbeamerfont{block body alerted}{}
108 \setbeamerfont{block body example}{}
109 \setbeamerfont{block title}{size=\large,parent={structure,block body}}
110 \setbeamerfont{block title alerted}{parent={block title,alerted text}}
111 \setbeamerfont{block title example}{parent={block title,example text}}
112
113 \setbeamerfont{item}{parent=structure}
114 \setbeamerfont{subitem}{parent=item}
115 \setbeamerfont{subsubitem}{parent=subitem}
116
117 \setbeamerfont{item projected}{size=\tiny,parent={item,projected text}}
118 \setbeamerfont{subitem projected}{parent=item projected}
119 \setbeamerfont{subsubitem projected}{parent=subitem projected}
120
121 \setbeamerfont{itemize item}{parent=item}
122 \setbeamerfont{itemize subitem}{parent=subitem}
123 \setbeamerfont{itemize subsubitem}{parent=subsubitem}
124
125 \setbeamerfont{enumerate item}{parent=item}
126 \setbeamerfont{enumerate subitem}{parent=subitem}
127 \setbeamerfont{enumerate subsubitem}{parent=subsubitem}
128
129 \setbeamerfont{itemize/enumerate body}{}
130 \setbeamerfont{itemize/enumerate subbody}{size=\small}
131 \setbeamerfont{itemize/enumerate subsubbody}{size=\footnotesize}
132
133
134 \setbeamerfont{description item}{parent=item}
135
136 \setbeamerfont{projected text}{parent={tiny structure}}
137
138 \setbeamerfont{abstract}{size=\small}
139 \setbeamerfont{abstract title}{parent={abstract,structure},size=\normalsize}
140
141 \setbeamerfont{verse}{family=\rmfamily,shape=\itshape}
142
143 \setbeamerfont{quotation}{shape=\itshape}
144 \setbeamerfont{quote}{parent=quotation}
145
146 \setbeamerfont{note page}{size=\small}
147
148 %%%% Layout options
149
150
151 %%%% Style options
152
153 \setbeamertemplate{items}[square]
154 \setbeamertemplate{sections/subsections in toc}[square]
155
156 \setbeamertemplate{navigation symbols}{}
157 %%% title page
158
159 \setbeamercolor{title page}{bg=upsblue, fg=white}
160 \setbeamercolor{framesubtitle}{bg=upsblue, fg=white}
161
162
163 \setbeamerfont{title}{size=\Huge,parent=structure}
164 \defbeamertemplate*{title page}{customized}[1][]
165 {
166   \begin{tikzpicture}[remember picture,overlay,x=\paperwidth,y=\paperheight]
167     \begin{scope}{on background layer}
168       \draw [line width=0pt, upsblue, fill=upsblue] (current
169       page.south east) rectangle (current page.north west);
170
171       %%%% 70x90x56.5
172       \draw [line width=0pt, upsdarkblue, fill=upsdarkblue]
173       ($(current page.east) + (0pt, 28.25pt)$) rectangle ($(current page.west) - (0, 28.25pt)$);
174       \node [anchor=south east, xshift=3.5pt,yshift=-4pt] at
175       ($(current page.east) - (0, 28.25pt)$) {
176             \includegraphics[width=70pt]{upsud-reserve}
177           };
178       \end{scope}
179       \node [anchor=west, yshift=0pt, xshift=15pt,align=left] at (current
180       page.west) {\usebeamerfont{title}\inserttitle\\\usebeamerfont{date}\insertdate};
181       \node [anchor=north west, xshift=15pt, align=left] at
182       ($(current page.west) - (0cm, 28.25pt)$)
183       {\usebeamerfont{author}\insertauthor};
184       \node [anchor=north west, yshift=0pt, xshift=15pt, align=left] at
185       (current page.north west) {\usebeamerfont{institute}\insertinstitute};
186     \end{tikzpicture}
187 %  \usebeamerfont{author}\insertauthor\par
188
189 %   \usebeamerfont{institute}\insertinstitute\par
190 %   \usebeamerfont{date}\insertdate\par
191 %   \usebeamercolor[fg]{titlegraphic}\inserttitlegraphic
192 }
193
194 %%% frames
195 \setbeamertemplate{frametitle}{
196   \begin{tikzpicture}[remember picture,overlay,x=\paperwidth,y=1.5cm]
197
198     \begin{scope}{on background layer}
199       \draw[upsblue, fill=upsblue] (current page.north west)
200       rectangle ($(current page.north east) - (0cm, 30pt)$);
201
202       \node [anchor=north east, yshift=4.5pt, xshift=4.5pt] at (current
203       page.north east) {
204         \includegraphics[height=30pt]{upsud-reserve}
205       };
206     \end{scope}
207     \node [anchor=north west] at ($(current page.north west) + (2em, 0pt)$) {
208       \usebeamerfont{frametitle}\insertframetitle
209     };
210     \node [anchor=south east] at ($(current page.north east) + (-2em,
211     -30pt)$) {
212       \usebeamerfont{framesubtitle}\insertsection
213     };
214     \end{tikzpicture}
215 }
216
217 \setbeamertemplate{footline}{
218   \ifnum\c@framenumber=1%
219   % On title page
220   \else%
221   \begin{tikzpicture}[remember picture,overlay]
222     \begin{scope}{on background layer}
223     \draw [upsgreen, line width=0.5pt] %
224      ($(current page.south east) + (-0.5cm, 0.5cm)$) -- ($(current
225      page.south west) + (0.5cm, 0.5cm)$);
226      \node [anchor=south east] at  ($(current page.south east) +
227      (-0.5cm, 0.2cm)$) { \insertframenumber/\inserttotalframenumber};
228      \end{scope}
229   \end{tikzpicture}
230   \fi
231 }
232
233 \mode
234 <all>