forked from ppletscher/beamerthemezurich
-
Notifications
You must be signed in to change notification settings - Fork 1
/
beamerouterthemeSantander.sty
168 lines (130 loc) · 5.15 KB
/
beamerouterthemeSantander.sty
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
\mode<presentation>
% TODO: cleanup & understand!
%-----------------------------------------------------------------------------
% OPTIONS
% Watermark
\DeclareOptionBeamer{watermark}{\def\beamer@Santander@watermark{#1}}
\ExecuteOptionsBeamer{watermark=} % Default value is empty
% Page number
\newif\ifbeamer@Santander@bigpagenumber
\beamer@Santander@bigpagenumberfalse
\DeclareOptionBeamer{bigpagenumber}{\beamer@Santander@bigpagenumbertrue}
% Footer
\newif\ifbeamer@Santander@footer
\beamer@Santander@footertrue
\DeclareOptionBeamer{nofooter}{\beamer@Santander@footerfalse}
% ???
\def\beamer@Santander@truetext{true} % Kludge for true/false so I can use ifx
\ProcessOptionsBeamer
%-----------------------------------------------------------------------------
\usepackage{tikz} % For fancy decorations
% I should fix these up to be more robust against color changes
\setbeamercolor{section in head/foot}{parent=footerlike}
\setbeamercolor{subsection in head/foot}{parent=footerlike}
\setbeamercolor{author in head/foot}{parent=footerlike}
\setbeamercolor{title in head/foot}{parent=footerlike}
% \setbeamercolor{author in head/foot}{parent=section in head/foot}
% \setbeamercolor{title in head/foot}{parent=subsection in head/foot}
\usesectionheadtemplate
{\hfill\insertsectionhead}
{\hfill\color{fg!50!bg}\insertsectionhead}
%%%%%%%%%%%%%%%%%%
% The footer bar %
%%%%%%%%%%%%%%%%%%
\defbeamertemplate*{footline}{Santander theme}{
\ifbeamer@Santander@footer
\leavevmode%
% OBSERVATION: the "%" symbols inside hbox are all very important here.
% The \hbox enviroment will insert spaces whenever there's whitespace
% Adding a % at the END of each line ensures that any hard returns aren't
% interpreted as white space. This allows the color boxes to be flush against
% one another. If a faint white line appears one could probably do something like
% hspace{-1px} and add an additional pixel-or-two wide beamercolorbox.
\hbox{%
\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm, rightskip=.3cm plus1fil]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor \end{beamercolorbox}%
%
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}{\textit \insertshorttitle}%
\hskip2ex plus1fill%
% \insertpagenumber\,/\,\insertpresentationendpage %% Want FRAME, not SLIDE number
\insertframenumber/\inserttotalframenumber
\end{beamercolorbox}%
}%
% This is a complete kludge for the faint white line which appears
% between the beamer color boxes above. (It doesnt appear in presentation mode
% but sometimes looks funny when the pdfs are viewed in a window)
\begin{tikzpicture}[overlay]
\usebeamercolor[bg]{author in head/foot}
\draw[thick] (0,3.625ex) -- (\paperwidth,3.625ex);
\draw (.4\paperwidth,0) -- (.4\paperwidth,3.625ex);
\draw[thick] (0,0) -- (\paperwidth,0);
\end{tikzpicture}
\fi
\ifbeamer@Santander@bigpagenumber
\begin{tikzpicture}[overlay]
\usebeamercolor[bg]{author in head/foot}
\draw[fill] (\paperwidth-5ex,3.625ex) circle (6ex);
\usebeamercolor[fg]{author in head/foot}
\draw[fill] (\paperwidth-5ex,3.625ex) circle (5ex);
\usebeamercolor[bg]{author in head/foot}
\node at (\paperwidth-5ex,4ex) {\small$^\text{\insertframenumber}/_\text{\inserttotalframenumber}$};
\end{tikzpicture}
\fi
}
\defbeamertemplate*{frametitle}{Santander theme}[1][left]
{
% \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\vbox{}\vskip-3.5ex%
%
\begin{beamercolorbox}[sep=0.3cm,#1,wd=\the\@tempdima]{solarized}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fte#1\endcsname\fi%
% \strut{\bf\insertframetitle}\strut\par% %% Include the \bf
\strut{\insertframetitle}\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else
{\usebeamerfont{framesubtitle}
\insertframesubtitle\strut\par}%
\fi
}%
%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{beamercolorbox}%
%%
% \def\beamer@fteright{\vskip0.35cm\advance\leftskip by 1.7cm\advance\rightskip by1.7cm}
}
% Sidebar right is important: anything placed here will be
% visible *behind* the main text. This is where to put any
% interesting watermarks.
%
%
\defbeamertemplate*{sidebar right}{Santander theme}
{
% \llap{\includegraphics[width=50px]{footdecoration}}
% \llap{\includegraphics[width=\paperwidth,height=\paperheight]{upperleft_watermark_transp}}
%
% THIS WOULD BE A NICE WAY TO PUT THE PARTICLE BUBBLE CHAMBER BG
% ... make a png of the background with TRANSPARENT BG
% ... then put the image here (use \hfill to get it on the left)
% Now one can FURTHER apply a slight gradient in the BG
%
%
\vskip.1\beamer@leftmargin%
% \llap{\insertlogo\hskip.5\beamer@leftmargin}%
\vfill%
\if \beamer@Santander@watermark\@empty
% This is kind of a kludge since if I put anything in here, I automatically get errors
% Somehow LaTeX wants to read the \else part!
\else%
\llap{\includegraphics[width=\paperwidth,height=\paperheight]{\beamer@Santander@watermark}}
\fi
}
\mode<all>
\endinput