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
|
% Copyright 2010 -- 2012 by tobig <tobias.goerlach@uni-hohneheim.de>
% https://bitbucket.org/tobig/hohenheimbeamertheme/overview
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.
\RequirePackage{ expl3, l3keys2e, xfrac, xparse}
\ProvidesExplPackage {hobete} {2012/06/24} {0004} {2012/6/24 Beamer Theme for University of Hohenheim}
\RequirePackage{tikz}
\tl_new:N\hoversion
\tl_set:Nn\hoversion{0004}
\bool_new:N \g_hobete_poster_bool
\bool_set_false:N \g_hobete_poster_bool
\bool_new:N \l_hobete_sectionpage_bool
\bool_set_false:N \l_hobete_sectionpage_bool
\cs_new:Npn\g_tg_frml_front{x\ }
\cs_new:Npn\g_tg_frml_back{\par}
\keys_define:nn {hobeteoptions}{
poster .bool_set:N=\g_hobete_poster_bool,
poster .default:n = false,
framelist front .code:n =\cs_set:Npn\g_tg_frml_front{ #1 },
framelist back .code:n =\cs_set:Npn\g_tg_frml_back{ #1 },
}
\keys_define:nn {hobetecommands} {
plain .bool_set:N = \l_hobete_sectionpage_bool,
plain .default:n = false,
}
\ProcessKeysOptions{hobeteoptions}
\typeout{ ________________________________________________}
\typeout{| ~This ~is ~the~ Hohenheim ~Beamer ~Theme ~ \hoversion.}
\typeout{| ~Please ~remark ~this ~is ~not ~a ~official ~Theme}
\typeout{| ~The ~University ~of ~Hohenheim ~will ~grant~ NO ~support~ at~ all}
\typeout{| ~If~ using~ the ~Logos, ~please ~make ~sure ~that ~you ~have ~the ~permission ~to ~do ~so!}
\typeout{| }
\typeout{|________________________________________________}
% Lets hack some stuff
\cs_new:Npn\cs_mylogo { }
\NewDocumentCommand\insertmylogo{}{\cs_mylogo }
\NewDocumentCommand\mylogo{m}{\cs_gset:Npn\cs_mylogo {#1} }
\bool_if:NF \g_hobete_poster_bool{% all the followig stuff is only needed in slide mode
\DeclareDocumentCommand\sectionpage{o}{%
\group_begin:
\keys_set_known:nnN {hobetecommands}{ #1 }\tl_unkown_keys%
\bool_if:NTF \l_hobete_sectionpage_bool%
{%
\begin{frame}[plain]\begin{beamercolorbox}[wd=\textwidth,ht=4ex,dp=1ex,center,rounded=true,shadow=true]{titlelike}\huge \insertsection \end{beamercolorbox}\end{frame}%
}%true
{%
\frame{\begin{beamercolorbox}[wd=\textwidth,ht=4ex,dp=1ex,center,rounded=true,shadow=true]{titlelike}\huge \insertsection \end{beamercolorbox}}
}%false
\group_end:
}%
%Here comes the Framelist
%
%\newcommand{\printframelist}{ }
%\newcommand{\@savefrml}{ }
%\newcommand{\frameliston}{%
%\let\oldframetitle\frametitle
%\newcommand{\tgframelistfronthook}{$\cdot$}
%\newcommand{\tgframelistbackhook}{\\ }
%\newcommand\myaddto[1]{%
%\write\@auxout{\noexpand\@writefile{frml}{\noexpand ##1}}}
%\renewcommand{\printframelist}{\@starttoc{frml}}
%\renewcommand{\frametitle}[1]{\oldframetitle{##1}%
%\xifstrequal{##1}{\@savefrml}{}{
%\myaddto{ \noexpand%
%\tgframelistfronthook ##1 \noexpand\tgframelistbackhook}%
%}
%\global\def\@savefrml{##1}%
%}
%}
%% Delcaring the i/o Streams
\iow_new:N\iow_frml
\ior_new:N\ior_frml
\let\oldframetitle\frametitle
\cs_new:Npn\iow_to_frml{}
% Survives outside \frametitle
\tl_new:N\tl_gtemp_save_frametitle
% Does not
\tl_new:N\l_temp_framelist_tl
% will store the whole fl at the begin
\tl_new:N\g_store_frml_tl
% will store new fl at end (which is written to file)
\tl_new:N\g_whole_framelist_tl
% Stores the fl-filename
\tl_new:N\tl_name_file_frml
% sets the fl-filename
\tl_gset:Nn\tl_name_file_frml{\c_job_name_tl.frml}
% check if file exits if not build a empty one
\file_if_exist:nTF {\tl_name_file_frml}
{ %reading in by input
\tl_set:Nn\g_store_frml_tl{ \input{ \tl_name_file_frml } }
% The following could be a l3 solution for read in line by line
% not used jet
%\ior_open:Nn\ior_frml{\tl_name_file_frml}
%\ior_str_map_inline:Nn \ior_frml
%{ \tl_gput_right:Nn \g_store_frml_tl {\g_tg_frml_front #1 \g_tg_frml_back } }
%\ior_close:N\ior_frml
}{ % making new file
\iow_open:Nn\iow_frml{\tl_name_file_frml}
\iow_now:Nn\iow_frml{ }
\iow_close:N\iow_frml
}
\DeclareDocumentCommand\frametitle { m } {
\oldframetitle{#1}%no changes to org definition
\tl_set:Nn\l_temp_framelist_tl{#1} % seems to be beter for comparing
% Now comparing the recent and the former frametitle
\str_if_eq:xxTF {\l_temp_framelist_tl}{\tl_gtemp_save_frametitle} {% do nothing if true
%
}{%false
%write to tl if e recent and the former frametitle are not the same
\tl_gput_right:Nn\g_whole_framelist_tl{\g_tg_frml_front #1 \g_tg_frml_back}
%\iow_now:Nx\iow_frml{\l_temp_framelist_tl} % would be another posibility, but keeps a stream open the whole time
% \iow_close:N\ios_frml
}
\tl_gset:Nn\tl_gtemp_save_frametitle{#1} % now overwriting global old frametitle with recent frametitle
% this is the last that should be done here
}
%
%
\AtEndDocument{% this is latex2e but saves a write stream
\iow_open:Nn\iow_frml{\tl_name_file_frml}
\iow_now:Nx\iow_frml{\g_whole_framelist_tl}
\iow_close:N\iow_frml
}
\DeclareDocumentCommand\printframelist{ }{ %
\tl_use:N\g_store_frml_tl
}% this simply prints the frametitle list
%------------------
% The Fancy Title stuff:
% First defining the print user code
\tl_new:N\g_logo_klein_tl
\tl_new:N\g_logo_gro_tl
\NewDocumentCommand\HohenheimLogoKlein{m}{%
%\def\g_logo_klein_tl
\tl_gset:Nn\g_logo_klein_tl{#1}
}
\NewDocumentCommand\HohenheimLogoLang{m}{%
\tl_gset:Nn\g_logo_gro_tl{#1}
}
% Now defining the respective Functions for the titlepage
% (They also could be defined in the Decision Tree below, but this is better to read)
% First if only the small logo exists
\NewDocumentCommand{\inserthotpwolang}{m}{\frame[plain]{
\begin{tikzpicture}[remember~picture,overlay]
\node [scale=1.7,fill ~opacity=.2,text ~opacity=.07] at (current ~page.south~ west) {\includegraphics{\g_logo_klein_tl} };
%\node [scale=0.9,fill opacity=.2,text opacity=.8] at (7,0) {\includegraphics{\g_logo_gro_tl} };
\end{tikzpicture}
\maketitle
\begin{center}%
#1%
\end{center}
}
}
% if no short logo
\NewDocumentCommand\inserthotpwokurz{m}{\frame[plain]{
\begin{tikzpicture}[remember~picture,overlay]
% \node [scale=1.7,fill opacity=.2,text opacity=.07] at (current page.south west) {\includegraphics{logoklein.eps} };
\node [scale=0.9,fill ~opacity=.2,text ~opacity=.8, xshift=1.2cm, yshift=-1.5cm] at (current ~page.north) {\includegraphics{\g_logo_gro_tl} };
\end{tikzpicture}\\[1cm]
\maketitle
\begin{center}%
#1%
\end{center}
}
}
%if both are defined
\NewDocumentCommand\inserthotp{m}{\frame[plain]{
\begin{tikzpicture}[remember~picture,overlay]
\node [scale=1.7,fill ~opacity=.2,text ~opacity=.07] at (current~page.south~west) {\includegraphics{\g_logo_klein_tl} };
\node [scale=0.9,fill ~opacity=.2,text~opacity=.8, xshift=1.2cm, yshift=-1.5cm] at (current~page.north) {\includegraphics{\g_logo_gro_tl} };
\end{tikzpicture}\\[1cm]
\maketitle%
% \vskip0pt plus 1filll
\begin{center}%
#1%
\end{center}
}
}
\NewDocumentCommand\HohenheimFancyTitle{m}{\frame[plain]{ \maketitle } } %Fall Back
\AtBeginDocument{
\tl_if_empty:NTF\g_logo_klein_tl{%true klein
\typeout{ __Hohenheim ~Beamer ~Theme ~says: __________________}
\typeout{| \string\HohenhemLogoKlein\space a ~is ~not ~defined ~please~ specify... dropping~ one~ Picture}%
\tl_if_empty:NTF \g_logo_gro_tl{%true groß
\typeout{| \string\HohenhemLogoLang\space is not defined please specify... dropping fancy Title... inserting boring one} %
\typeout{|________________________________________________}%
}{%flase groß -> also kein klein aber groß
\typeout{| seems that \string\HohenhemLogoLang\space exists... Lets see what we can do with it}
\typeout{|________________________________________________}
\RenewDocumentCommand\HohenheimFancyTitle{m}{\inserthotpwokurz{#1}}%
}}
{%klein false (vorhanden)
\tl_if_empty:NTF\g_logo_gro_tl{ % klein vorhanden, groß nicht
\typeout{| \string\HohenhemLogoLang\space is not defined... i ll try my best} %
\typeout{|________________________________________________}
\RenewDocumentCommand\HohenheimFancyTitle{1}{\inserthotpwolang{#1}}%
}
{% klein da groß da
\RenewDocumentCommand\HohenheimFancyTitle{m}{\inserthotp{#1}}
}
}}
}
\usetheme{hohenheim}% we need that in any case
\bool_if:NT \g_hobete_poster_bool% Check if Poster is requested ift poster=true load hohenheimposter
{
\useoutertheme{hohenheimposter}
\typeout{ ________________________________________________}
\typeout{| ~This ~is ~the~ Hohenheim ~Beamer ~Theme ~ \hoversion.}
\typeout{| ~Now~entering ~Poster ~Mode}
\typeout{|________________________________________________}
%
%
%
%
%
%
% now all the --- Poster --- Stuff:
% the following definitions are neither brilliant nor very hard to code for the users
% their purpose is to make the user-end code a bit cleaner
\NewDocumentEnvironment{posterblock}{m}{\begin{block}{#1}}{\end{block}\vfill}
%
\NewDocumentEnvironment{outerretainblock}{}{ \begin{column}{.49\textwidth}
\begin{beamercolorbox}[center,wd=\textwidth]{postercolumn}
\begin{minipage}[t][\columnheight][t]{.95\textwidth}}%
{ %
\end{minipage}
\end{beamercolorbox}
\end{column}\hfill}
%
\NewDocumentCommand\insertemail{}{\tl_to_str:N\tl_posteremail }
\NewDocumentCommand\posteremail{m}{\tl_set:Nn\tl_posteremail{#1} }
\NewDocumentCommand\insertwebsite{}{\tl_to_str:N\tl_posterwebsite }
\NewDocumentCommand\posterwebsite{m}{\tl_set:Nn\tl_posterwebsite{#1} }
}
%
% EOF
|