summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/beamertheme-npbt/beamerthemeNPBT.sty
blob: df6e40e9633ca7e27d3f2f6c07d233ad02678b89 (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
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemeNPBT}[2018/08/15 v4.1 Main Beamer Theme of NPBT]
% ===========================================================================
% beamerthemeNPBT.sty
% ===================---------------------------------------------------------
% 
% (C) in 2017/18 by Norman Markgraf (nmarkgraf(at)hotmail(dot)com)
%
% NPBT <-> Norman's Pandoc Beamer Theme -> NPBT 
% ----     =        =      =      =
%
%
% ---------------------------------------------------------------------------
%
\mode<presentation>
% ---------------------------------------------------------------------------
% Used Packages:
% ---------------------------------------------------------------------------
\RequirePackage{ifthen} 
\RequirePackage{multicol} % Für das zweispaltige TOC.
% ---------------------------------------------------------------------------

\def\softness{0.8}

\definecolor{softred}{rgb}{1,\softness,\softness}
\definecolor{softgreen}{rgb}{\softness,1,\softness}
\definecolor{softblue}{rgb}{\softness,\softness,1}
% ---------------------------------------------------------------------------
\definecolor{NPBTblue}{rgb}{0.77,0.58,0.75}
\definecolor{NPBT}{rgb}{0,0.67,0.6}
\definecolor{NPBTTitelColor}{RGB}{0,38,153}

% ---------------------------------------------------------------------------
\setbeamercolor*{structure}{fg=NPBTblue, bg=softblue}
\setbeamercolor{structure}{fg=NPBT}

% ---------------------------------------------------------------------------
% title page
% ---------------------------------------------------------------------------
\setbeamercolor{title in titlepage}{fg=NPBTTitelColor}
\setbeamercolor{institute in titlepage}{fg=lightgray}
\setbeamercolor{author in titlepage}{fg=darkgray}

% ---------------------------------------------------------------------------
\setbeamerfont{title in titlepage}{size=\Large, series=\bfseries}
\setbeamerfont{institute in titlepage}{size=\large, series=\bfseries}
\setbeamerfont{author in titlepage}{series=\bfseries}

% ---------------------------------------------------------------------------
% part title page
% ---------------------------------------------------------------------------
\setbeamercolor{part title}{fg=NPBTTitelColor}

% ---------------------------------------------------------------------------
% section title page
% ---------------------------------------------------------------------------
\setbeamercolor{section name}{fg=NPBTTitelColor}
\setbeamercolor{section title}{fg=NPBTTitelColor}

% ---------------------------------------------------------------------------
\setbeamerfont{section name}{size=\Large, family=\sffamily, series=\bfseries}

% ---------------------------------------------------------------------------
% subsection title page
% ---------------------------------------------------------------------------
\setbeamercolor{subsection name}{fg=NPBTTitelColor}
\setbeamercolor{subsection title}{fg=NPBTTitelColor}

% ---------------------------------------------------------------------------
\setbeamerfont{subsection name}{size=\large, family=\sffamily, series=\bfseries}

% ---------------------------------------------------------------------------
% header
% ---------------------------------------------------------------------------
\setbeamercolor{myheader}{fg=darkgray}
\setbeamercolor{section in head}{parent=myheader}
\setbeamercolor{subsection in head}{parent=myheader}
\setbeamercolor{frametitle in head}{parent=myheader, fg=NPBTTitelColor}

% ---------------------------------------------------------------------------
\setbeamerfont{myheader}{}
\setbeamerfont{section in head}{parent=myheader}
\setbeamerfont{subsection in head}{parent=myheader}
\setbeamerfont{frametitle in head}{parent=myheader}

% ---------------------------------------------------------------------------
\setbeamercolor{footer}{fg=normal text.fg}
\setbeamercolor{author in footer}{parent=footer}
\setbeamercolor{date in footer}{parent=footer}
\setbeamercolor{title in footer}{parent=footer}
\setbeamercolor{framenumber in footer}{parent=footer}

% ---------------------------------------------------------------------------
% 
\setbeamerfont{block title}{size={}}
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
\setbeamerfont{frametitle}{shape=\upshape,family=\sffamily,series=\mdseries}

% ---------------------------------------------------------------------------
%
% FIX ME!!!
%
\usetheme{Boadilla}

\useinnertheme{rounded}

%
% FIX ME!!!
%
\setbeamertemplate{items}[triangle]
\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{navigation symbols}{}

% ---------------------------------------------------------------------------
% Font setting
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
% Mathematische Formeln mit Serifen
%
\usefonttheme[onlymath]{serif}

% ---------------------------------------------------------------------------
%running fraction with slash - requires math mode.
\newcommand*\rfrac[2]{{}^{#1}\!/_{#2}}

% ---------------------------------------------------------------------------
%
% Fontsetting
% ===========
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
\ifxetex% XeLaTeX Fontsetting                                               %
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
\usepackage{xltxtra}
% Now done via _output.yaml ! 
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
\else%    pdf-LaTeX Fontsetting                                             % 
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
% # Latin Modern
% Die LaTeX Standardschrift ist die Latin Modern (lmodern Paket).
% If Latin Modern is not available for your distribution you must install the
% package cm-super instead. Otherwise your fonts will look horrible in the PDF
%
  \usepackage{lmodern}
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
%
% needed for all T1 fonts!
  \usepackage[T1]{fontenc} 	% sonst wird OT1 coding ausgegeben 
%							% und dann funktioniert Myriad (pmy) nicht mehr
  \usepackage{textcomp} 		% sonst wird OT1 coding ausgegeben 
%							% und dann funktioniert Myriad (pmy) nicht mehr

% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
% # Palantino: Serifen für die Mathematischen Formeln (pplx, pplj)
\ifxetex\relax\else
\usepackage[%
  osf,
  sc
]{mathpazo} 
\fi
%\renewcommand{\sfdefault}{pplx}
%\renewcommand{\sfdefault}{pplj}
%
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
% # Schrifttype eulervm / Euler Virtual Math
%
% URL: 
% http://ftp.riken.jp/tex-archive/fonts/eulervm/doc/latex/eulervm/eulervm.pdf
%  Zitat: Do not use the Euler math fonts in conjunction with the default 
%         Computer Modern text fonts – this is ugly!
  \usepackage[                           %% --- EulerVM (MATH)
    small,       %for smaller Fonts
    OT1,
%   euler-digits % digits in euler fonts style
  ]{eulervm}
% 
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
% \DeclareSymbolFont{operators}   {OT1}{cmr} {m}{n}
  \DeclareSymbolFont{letters}     {OML}{zplm} {m}{it}
% \DeclareSymbolFont{symbols}     {OMS}{cmsy}{m}{n}
% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
% ---------------------------------------------------------------------------
% eurosym für das Euro-Symbol
% =======
%
% Als Option "official" für das "offizelle" Eurosymbol
%
%\usepackage[official]{eurosym}
%
\usepackage{eurosym}
% Eurosymbol auch in mathematischen Formeln richtig darstellen
%
\DeclareRobustCommand{\officialeuro}{%
  \ifmmode\expandafter\text\fi
  {\fontencoding{U}\fontfamily{eurosym}\selectfont e}}
%
% \euro in UTF-8 als Standard-Eurozeichen definieren
%
  \DeclareUnicodeCharacter{20AC}{\euro}

%
\fi

% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 

% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
% was: mygeometry.tex
% ===================--------------------------------------------------------
%
% (C) in 2017/18 by Norman Markgraf (nmarkgraf(at)hotmail(dot)com)
%
% ---------------------------------------------------------------------------
%
\newlength{\myPaperWidth}
\newlength{\myPaperHeight}

\newcommand*{\setScreenRatio}[1]{%
%
% Default:
%
\setlength{\myPaperWidth}{140mm}
\setlength{\myPaperHeight}{105mm}

\ifthenelse{\equal{#1}{4x3}}{%
%\ifstrequal{#1}{4x3}{%
	%% 4:3 -> 160 x 120
	\setlength{\myPaperWidth}{160mm}
	\setlength{\myPaperHeight}{120mm}
	\typeout{Set ScreenRatio to 4:3 (160x120)}
}{
    \ifthenelse{\equal{#1}{16x9}}{%
%	\ifstrequal{#1}{16x9}{%
		%% 16:9 ->  224 x 126
		\setlength{\myPaperWidth}{224mm}
		\setlength{\myPaperHeight}{126mm}
	\typeout{Set ScreenRatio to 16:9 (224x126)}
	}{%
		%% Default:
		\setlength{\myPaperWidth}{140mm}
		\setlength{\myPaperHeight}{105mm}
		\typeout{Set ScreenRatio to default (140x105)}
	}
}
\geometry{paperwidth=\myPaperWidth,paperheight=\myPaperHeight}
}

\setScreenRatio{4x3}

\def\footlinesize{\scriptsize} % \tiny\footnotesize\scriptsize
%
\InputIfFileExists{customize_geom.tex}{\relax}{\relax}
%
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
%
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
% was: section.tex
% =================----------------------------------------------------------
%
% (C) in 2017/18 by Norman Markgraf (nmarkgraf(at)hotmail(dot)com)
%
% ---------------------------------------------------------------------------
%
\def\imagepath{images/}

\def\npbtBackground{background}
\def\npbtLine{linie}
\def\npbtLogo{logo}
\def\npbtFrameTitleBackgound{frametitlebackground}

\newcommand{\updateNPBTimages}{%
	\def\backgroundimage{\imagepath\npbtBackground}
	\def\lineimage{\imagepath\npbtLine}
	\def\logoimage{\imagepath\npbtLogo}
	\def\titlebackgroundimage{\imagepath\npbtFrameTitleBackgound}
}
\updateNPBTimages{}

\def\logowidth{1cm}
\def\logoheight{1cm}
\def\logoxshift{-0.7cm}
\def\logoyshift{-0.7cm}
%\def\titleboxwidth{0.6\myPaperWidth}
\def\titleboxwidth{0.5\linewidth}
%\def\sectiontitleboxwidth{0.75\myPaperWidth}
\def\sectiontitleboxwidth{0.75\linewidth}
\def\sectionpagewidth{0.5\myPaperWidth}
\def\sectionpageheight{0.25\myPaperHeight}
\def\subsectionpagewidth{0.5\myPaperWidth}
\def\subsectionpageheight{0.25\myPaperHeight}
%
\def\myleftskip{0.4cm}
\def\myrightskip{0.0cm}
\def\mysepsize{0.6em}

% My FrameTitleBox ...
\newsavebox{\myftbox}
\newlength{\myftboxwidth}
\newlength{\myftboxmaxwidth}
\setlength{\myftboxmaxwidth}{390pt}
\def\myftboxscale{1.0}

% ---------------------------------------------------------------------------
\usepackage{ragged2e} % Liefert FlushRight-Umgebung
% ---------------------------------------------------------------------------
\usepackage{ifthen}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\usetikzlibrary{backgrounds}
\usepackage{pgfplots}
\pgfplotsset{compat=1.3}
\usepackage{xspace}
\usepackage{array}
\usepackage{xstring}

%\ifstrempty{\insertinstitute}{%
%  \institute{Standort Köln}%
%}{\relax}

\newif\ifnpbtexercisemode
\npbtexercisemodefalse
%  \npbtexercisemodetrue


% ---------------------------------------------------------------------------
%
% logoline
%
\newcommand{\logoline}{%
  \includegraphics[%
           width=0.86\paperwidth%
        ]{%
           \lineimage%
        }%
}

\newcommand{\putLogo}{%
  \node[%
    shift={(\logoxshift,\logoyshift)},
    inner sep=0pt
  ] at (current page.north east){%
      \includegraphics[width=\logowidth,height=\logoheight]{\logoimage}%
  };%
}

\newcommand{\setLogo}{%
  \begin{tikzpicture}[%
      remember picture, 
      overlay
    ]
      \putLogo%
  \end{tikzpicture}%
}

% ---------------------------------------------------------------------------
%
% title page:
%
\defbeamertemplate{title page}{minimal}
{
  \inserttitle
  \par
  
  \insertinstitute ~\xspace -- \insertdate
  \par
  
  \insertauthor
  \par
}

\defbeamertemplate{title page}{normal}
{
  \begin{tikzpicture}[remember picture, overlay]
    \node[inner sep=0pt] at (current page.center){%
              \includegraphics[width=\myPaperWidth,height=\myPaperHeight]{\backgroundimage}%
      };%
    \putLogo%
    \node[%
      anchor=south east,
      xshift=-1.95cm,
      yshift=3.65cm
    ] at (current page.south east){%
        \begin{minipage}[b]{\titleboxwidth}
            \begin{flushright} % XXXX
                {\usebeamercolor[fg]{title in titlepage}%
                 \usebeamerfont{title in titlepage} \inserttitle}
                \par
                \vspace*{0.7em}
                {\usebeamercolor[fg]{institute in titlepage}%
                 \usebeamerfont{institute in titlepage} \insertinstitute ~\xspace -- \insertdate}
                \usebeamerfont{institute in titlepage}\par
                {\usebeamercolor[fg]{author in titlepage}%
                 \usebeamerfont{author in titlepage} \insertauthor}
            \end{flushright} % XXXX
        \end{minipage}    
    };%
  \end{tikzpicture}%
}

% ---------------------------------------------------------------------------
%
% Frame title template:
%
\defbeamertemplate{headline}{sectioninhead}{%
  \nointerlineskip%
  \begin{beamercolorbox}[%
      ht=3.00em, %3.25em, %
      sep=0pt, %
      leftskip=\myleftskip, %
      rightskip=\myrightskip, %
  ]{headline}
    {%
      \usebeamercolor[fg]{section in head}%
      \usebeamerfont{section in head}%
      \thesection.~\NoHyper\insertsection\endNoHyper\phantom{X}%
    }%
  \end{beamercolorbox}
  % Hier gehört die Kapitelbezeichnung rein!
}

\defbeamertemplate{headline}{nosectioninhead}{%
  \nointerlineskip%
  \begin{beamercolorbox}[%
      ht=3.00em, %3.25em, %
      sep=0pt, %
      leftskip=\myleftskip, %
      rightskip=\myrightskip, %
  ]{headline}
  \phantom{X}
  \end{beamercolorbox}
}

\defbeamertemplate{headline}{minimal}{
\relax%
}

%
% ---------------------------------------------------------------------------
%
\defbeamertemplate{frametitle}{minimal}{%
  \usebeamercolor[fg]{frametitle in head}%
  \usebeamerfont{frametitle in head}%
  \insertframetitle%
}

\defbeamertemplate{frametitle}{normal}{%
  \npbtexercisemodefalse%
  \makeatletter%
  \expandarg%
  \IfSubStr*{\beamer@frametitle}{bung}{\npbtexercisemodetrue}{\relax}%
  \IfBeginWith*{\beamer@frametitle}{Offene}{\npbtexercisemodetrue}{\relax}%
  \makeatother%
  \savebox{\myftbox}{%
      \ifnpbtexercisemode\usebeamercolor[fg]{frametitle in head exercise}\else\usebeamercolor[fg]{frametitle in head}\fi%
      \ifnpbtexercisemode\usebeamerfont{frametitle in head exercise}\else\usebeamerfont{frametitle in head}\fi%
      \insertframetitle}% end of savebox!
  \ifnpbtexercisemode{%
    \begin{tikzpicture}[remember picture, overlay]
        \node[anchor=west, inner sep=0pt, yshift=-\logoheight+5pt] at (current page.north west){%
            \includegraphics[%
                width=0.86\paperwidth,%
                height=1.25em
            ]{\titlebackgroundimage}%
          };%
    \end{tikzpicture}%
    \vskip-43pt%
  }\else\fi% end of ifnpbtexercisemode
  \settowidth{\myftboxwidth}{\usebox{\myftbox}}%
  \vskip6pt\vskip0pt%
  \begin{beamercolorbox}[%
      ht=1.20em, %
      sep=0pt, %
      leftskip=\myleftskip, %
      rightskip=\myrightskip, %
      wd=\paperwidth %
    ]{frametitle}%
      \ifdim\myftboxwidth>\myftboxmaxwidth%
        \resizebox{\myftboxmaxwidth}{!}{\usebox{\myftbox}}\\[-0.85em]
      \else%
        \usebox{\myftbox}\\[-0.85em]
      \fi
      \ifnpbtexercisemode\else\logoline\fi%
  \end{beamercolorbox}%
  \begin{tikzpicture}[%
      remember picture, %
      overlay %
    ]
      \putLogo%
  \end{tikzpicture}%
  \vskip-1.05em\vskip0pt%
}

% ---------------------------------------------------------------------------
%
% Footline template
%
\defbeamertemplate{footline}{nofootline}{%
  \relax%
}

\defbeamertemplate{footline}{normal}{% Skip first frame == Title frame !!!
%    \leavevmode%
    \ifthenelse{\equal{\insertframenumber}{1}}{%
    }{%
      \begin{beamercolorbox}[%
          ht=0.08ex,
          leftskip=\myleftskip,
          rightskip=\myrightskip
        ]{footline}
        \logoline%
      \end{beamercolorbox}%
      \begin{beamercolorbox}[%
          ht=1.25ex, 
          %dp=2.25ex,
          dp=1.35ex,
          leftskip=\myleftskip,
          rightskip=\myrightskip
        ]{footline}
        {%
          {%
            \usebeamercolor{date in footline}%
            \usebeamerfont{date in footline}%
            \insertdate  %
          }%
          \hfill%
          {%
            {%
              \usebeamercolor{author in footline}%
              \usebeamerfont{author in footline}%
              \insertshortauthor  %
            }%
            {%
              \usebeamercolor{separator in footline}%
              \usebeamerfont{separator in footline}%
              \hspace{\mysepsize}$|$\hspace{\mysepsize}%
            }%
            {%
              \usebeamercolor{title in footline}%
              \usebeamerfont{title in footline}%
              \inserttitle  %
            }%
          }%
          \hfill%
          \vspace*{-0.9em}%
          \raggedleft{%
            \usebeamercolor{number in footline}%
            \usebeamerfont{number in footline}%
            \insertframenumber \hspace*{0.3cm}%
          }%
        }%
      \end{beamercolorbox}
      \vspace*{0.2cm}
    }
}

% ---------------------------------------------------------------------------
%
% Section page template
%
%\setbeamertemplate{section page}
%{
%    \begin{centering}
%    \begin{beamercolorbox}[sep=12pt,center]{section title}
%      \usebeamerfont{section title}\insertsection\par
%    \end{beamercolorbox}
%    \end{centering}
%}
% ********
% FIX ME: Orginal aus dem PPTX: 4,41cm von rechts, 10,23cm vob oben ist eine 3,47cm hohe und
% ======= 18,85cm breite Box die von rechts unten her gefüllt wird!
% ********

\defbeamertemplate{section page}{minimal}
{
  \vfill\insertsectionhead\vfill
}

\defbeamertemplate{section page}{normal}
{
  \begin{tikzpicture}[remember picture, overlay]
    \node[anchor=south east,xshift=-1cm,yshift=1.5cm] at (current page.south east){%
        \begin{minipage}[b][\sectionpageheight][t]{\sectionpagewidth}
          \begin{FlushRight}
              \usebeamercolor{sectionnumber title}%
              \usebeamerfont{sectionnumber title}\insertsectionheadnumber %
              \usebeamercolor{section title}%
              \usebeamerfont{section title}\insertsectionhead\par
          \end{FlushRight}
        \end{minipage}
    };%
  \end{tikzpicture}
}

% ---------------------------------------------------------------------------
%
% Subsection page template
%
\defbeamertemplate{subsection page}{minimal}
{
  \vfill\insertsubsectionhead\vfill
}

\defbeamertemplate{subsection page}{normal}
{
  \begin{tikzpicture}[remember picture, overlay]
    \node[anchor=south east,xshift=-1cm,yshift=1.5cm] at (current page.south east){%
        \begin{minipage}[b][\sectionpageheight][t]{\sectionpagewidth}
          \begin{FlushRight}
              \usebeamercolor{sectionnumber title}%
              \usebeamerfont{sectionnumber title}\insertsubsectionheadnumber %
              \usebeamercolor{section title}%
              \usebeamerfont{section title}\insertsubsectionhead\par
          \end{FlushRight}
        \end{minipage}
    };%
  \end{tikzpicture}
}

% ---------------------------------------------------------------------------
%
% Note page (default) updated!
%
\defbeamertemplate{note page}{mydefault}
{%
  {%
    \scriptsize
    \usebeamerfont{note title}\usebeamercolor[fg]{note title}%
    \ifbeamercolorempty[bg]{note title}{}{%
      \insertvrule{.25\paperheight}{note title.bg}%
      \vskip-.25\paperheight%
      \nointerlineskip%
    }%
    \vbox{%
      \hspace*{.6875\paperwidth}\insertslideintonotes{0.25}%
      \vskip-0.25\paperheight%
      \nointerlineskip
      \begin{pgfpicture}{0cm}{0cm}{0cm}{0cm}
        \begin{pgflowlevelscope}{\pgftransformrotate{90}}
          {\pgftransformshift{\pgfpoint{-2cm}{0.2cm}}%
          \pgftext[base,left]{\usebeamerfont{note date}\usebeamercolor[fg]{note date}\the\year-\ifnum\month<10\relax0\fi\the\month-\ifnum\day<10\relax0\fi\the\day}}
        \end{pgflowlevelscope}
      \end{pgfpicture}
    }%
    \nointerlineskip
    \vbox to .25\paperheight{\vskip0.5em
      \hbox{\insertshorttitle[width=8cm]}%
      \setbox\beamer@tempbox=\hbox{\insertsection}%
      \hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip4pt\raise3pt\hbox{\vrule
            width0.4pt height7pt\vrule width 9pt
            height0.4pt}}\hskip1pt\hbox{\begin{minipage}[t]{7.5cm}\def\breakhere{}\insertsection\end{minipage}}\fi%
      }%
      \setbox\beamer@tempbox=\hbox{\insertsubsection}%
      \hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip17.4pt\raise3pt\hbox{\vrule
            width0.4pt height7pt\vrule width 9pt
            height0.4pt}}\hskip1pt\hbox{\begin{minipage}[t]{7.5cm}\def\breakhere{}\insertsubsection\end{minipage}}\fi%
      }%
      \setbox\beamer@tempbox=\hbox{\insertshortframetitle}%
      \hbox{\ifdim\wd\beamer@tempbox>1pt{\hskip30.8pt\raise3pt\hbox{\vrule
            width0.4pt height7pt\vrule width 9pt
            height0.4pt}}\hskip1pt\hbox{\insertshortframetitle[width=7cm]}\fi%
      }%
      \vfil}%
  }%
  \ifbeamercolorempty[bg]{note page}{}{%
    \nointerlineskip%
    \insertvrule{.75\paperheight}{note page.bg}%
    \vskip-.75\paperheight%
  }%
  \vskip.25em
  \nointerlineskip
  %
  %\textwidth=10.8cm%
  \textwidth=13.8cm%
  \hsize=\textwidth%
  %
  \insertnote
}
%
% ---------------------------------------------------------------------------
% Minimal Setup
%
\newcommand*{\setNPBTminimal}{%
    \setbeamertemplate{subsection page}[minimal]%
    \setbeamertemplate{note page}[mydefault]%
    \setbeamertemplate{title page}[minimal]%
    \setbeamertemplate{headline}[minimal]%
    \setbeamertemplate{footline}[nofootline]%
    \setbeamertemplate{frametitle}[minimal]%
    \setbeamertemplate{section page}[minimal]%
}
%
% ---------------------------------------------------------------------------
% Normal Setup
%
\newcommand*{\setNPBTnormal}{%
    \setbeamertemplate{subsection page}[normal]%
    \setbeamertemplate{note page}[mydefault]%
    \setbeamertemplate{title page}[normal]%
    \setbeamertemplate{headline}[sectioninhead]%
    \setbeamertemplate{footline}[normal]%
    \setbeamertemplate{frametitle}[normal]%
    \setbeamertemplate{section page}[normal]%
}
\setNPBTnormal{}
%
\InputIfFileExists{customize_theme.tex}{\relax}{\relax}

% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
\mode<all>
%
% ===========================================================================
%