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
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%===styled by===%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%===ashish revar===%%%%%%%%%%%%%%%%%%
%%%%%%%%%%===ashishrevar@gmail.com===%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%===9909298846===%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This material is subject to the LaTeX Project Public License
\def\beamer@nirmabeamer@version{0.1}
\ProvidesPackage{beamerthemenirma}
\RequirePackage{beamerbasethemes}[2004/10/07] \RequirePackage{pgf}
% To have normal text etc in sans-serif, but equations in serif.
\usefonttheme[onlymath]{serif}
%-------------------------------------------------------------------------------
% detect PDF-LaTeX
\newif\ifpdf
\ifx\pdfoutput\undefined\pdffalse\else\pdftrue\fi
%-------------------------------------------------------------------------------
% color stuff
%\definecolor{nirmablue}{cmyk} {1.0,0,0,0.58} % WUR 'petrol' blue
%\definecolor{nirmagreen}{cmyk}{0.55,0,0.77,0} % WUR green
% % RGB CMYK PMS
\definecolor{nirmablue}{rgb}{0,0.298,0.471} % 0 76 120 1 0 0 0.58 3025
\definecolor{nirmagreen}{rgb}{0.502,0.729,0.392} % 128 186 100 0.55 0 0.77 0 360
\definecolor{nirmaorange}{rgb}{0.918,0.698,0} % 234 178 0
\def\normalcolorhack{
\usebeamercolor{normal text}
\color{fg}
\def\normalcolor{\color{normal text.fg}}
}
\def\setanysheetcolors{
\setbeamercolor*{local structure}{fg=nirmaorange}
\setbeamercolor*{title}{fg=nirmagreen}
\setbeamercolor*{subitem}{parent=item,fg=nirmagreen}
\setbeamercolor*{logobar}{fg=nirmablue} }
\def\setwhitesheetcolors{
\setbeamercolor*{normal text}{fg=nirmablue,bg=white}
\setbeamercolor*{alerted text}{fg=nirmagreen}
\setbeamercolor*{structure}{fg=nirmablue} \setanysheetcolors }
\def\setbluesheetcolors{
\setbeamercolor*{normal text}{fg=white,bg=nirmablue}
\setbeamercolor*{alerted text}{fg=nirmagreen}
\setbeamercolor*{structure}{fg=white} \setanysheetcolors }
% Enforce blue-on-white when making handouts.
\mode<handout>{\let\setbluesheetcolors=\setwhitesheetcolors}
%-------------------------------------------------------------------------------
% font definitions
\setbeamerfont{title}{size=\huge}
\setbeamerfont{subtitle}{size=\LARGE}
\setbeamerfont{author}{}
\setbeamerfont{institution}{size=\small}
% my own fonts
\setbeamerfont{logobar}{}
%-------------------------------------------------------------------------------
% basic layout stuff
\newlength\barheight\setlength\barheight{\paperheight}
\divide\barheight by 12
%-------------------------------------------------------------------------------
% \underline
\newdimen\ul@depth
\def\underline#1{%
\par\noindent
\@tempdima=\textwidth
\advance\@tempdima by \beamer@leftmargin
\advance\@tempdima by \beamer@rightmargin
\setbox0=\hbox to \@tempdima{\hspace*{\beamer@leftmargin}#1\hfill}%
\hspace*{-\beamer@leftmargin}%
\global\ul@depth=\dp0%
\hbox to \@tempdima{\vbox{\box0\vskip-\ul@depth\hrule}}}%
%-------------------------------------------------------------------------------
% picture bar
% user-command to change the picture bar used:
\def\picturebar#1{\def\@picturebar{#1}}
\def\@picturebar{nirma-picturebar}
\titlegraphic{\hspace*{-\Gm@lmargin}\includegraphics[width=\paperwidth]{\@picturebar}}
%-------------------------------------------------------------------------------
% title page
\setbeamertemplate{title page}
{
% The main title is typeset on a thin rule, forming a box that that is 2 unit-bars high.
\vbox to 2\barheight{%
\vfill
{\usebeamerfont{title}\usebeamercolor[fg]{title}\underline{\inserttitle}}}
% The optional subtitle
\ifx\insertsubtitle\@empty\else%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}
\fi
\vskip0pt plus 1filll
% Author
{\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor}
% Institution
\vskip4pt
{\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute}
\vskip0pt plus 1filll
% WUR picture bar. Defined above.
\inserttitlegraphic
% Cancel the 4pt skip that beamer inserts above the footline.
\vspace*{-4pt}
}
%-------------------------------------------------------------------------------
% frame title
\setbeamertemplate{frametitle}{%
\vbox to \barheight{\vfill\underline{\insertframetitle}}}
%-------------------------------------------------------------------------------
% logo bar
\newlength\logobarheight\setlength\logobarheight{\barheight}
\newlength\logosep\setlength\logosep{0.5\logobarheight}
\pgfdeclareimage[height=\logobarheight]{NU-logo}{nu}%Main logo of Nirma
\pgfdeclareimage[height=0.6\logobarheight]{NWO-logo}{nwo}%Second level logo
\pgfdeclareimage[height=\logobarheight]{Alterra-logo}{alterra}%Third level logo
% these are availabe to users for constructing their logo
\def\nulogo{\pgfuseimage{NU-logo}}
\def\alterralogo{\pgfuseimage{Alterra-logo}}
\def\nwologo{\hbox{\vbox to \logobarheight{\vfill\hbox{\pgfuseimage{NWO-logo}}\vfill}}}
% Initially, have an empty logo bar
\let\logobarlogo=\relax
% routine to add a logo
\def\addlogo#1{%
\ifx\logobarlogo\relax
\def\logobarlogo{#1}
\else
\g@addto@macro{\logobarlogo}{\hspace{\logosep}}
\g@addto@macro{\logobarlogo}{#1}
\fi
}
% routine to reset the logo bar (i.e. for using the Alterra logo instead
\def\resetlogo{\let\logobarlogo=\relax}
\def\logobartext#1{\gdef\@logobartext{#1}}
\def\@logobartext{}
\def\buildlogobar{%
\noindent\hbox to \paperwidth{%
\hspace*{\logosep}
\logobarlogo
\ifx\logobarlogo\relax\else\hspace{\logosep}\fi
\hfill
\hbox{\vbox to \logobarheight{\vfill\hbox{{\usebeamerfont{logobar}\usebeamercolor[fg]{logobar}\@logobartext}}\vfill}}%
\hspace*{\logosep}}}
\def\whitesheetfootline{
\begin{pgfpicture}{0cm}{0cm}{\the\paperwidth}{\the\logobarheight}
% Draw a blue line to mark the logo bar
\pgfsetstrokecolor{nirmablue}
\pgfpathmoveto{\pgfpoint{0pt}{\the\logobarheight}}
\pgfpathlineto{\pgfpoint{\the\paperwidth}{\the\logobarheight}}
\pgfusepath{stroke}
% Make a TeX box containing the actual logo bar contents, and place it at the lower-left
\pgftext[left,bottom]{\buildlogobar}
\end{pgfpicture}
}
\def\bluesheetfootline{
\begin{pgfpicture}{0cm}{0cm}{\the\paperwidth}{\the\logobarheight}
% Draw a white rectangle to mark the logo bar
\pgfsetfillcolor{white}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\the\paperwidth}{\the\logobarheight}}
\pgfusepath{fill}
% Make a TeX box containing the actual logo bar contents, and place it at the lower-left
\pgftext[left,bottom]{\buildlogobar}
\end{pgfpicture}
}
%-------------------------------------------------------------------------------
% blue vs white sheets
\def\bluesheets{
%\setbeamertemplate{background}{\bluesheetbackground}
\setbeamertemplate{footline}{\bluesheetfootline}
\setbluesheetcolors
\normalcolorhack
\gdef\debug{[bluesheets set]]}
}
\def\whitesheets{
%\setbeamertemplate{background}{\whitesheetbackground}
\setbeamertemplate{footline}{\whitesheetfootline}
\setwhitesheetcolors
\normalcolorhack
}
%-------------------------------------------------------------------------------
% setup
\bluesheets
% Disable the navigation buttons
\setbeamertemplate{navigation symbols}{}
% Use the Wageningen University logo by default
\addlogo{\nulogo}
\endinput
|