\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>
%
% ===========================================================================
%