Select Git revision
beamerthemePTB.sty
Rolf Niepraschk authored
beamerthemePTB.sty 3.40 KiB
\setcounter{errorcontextlines}{100}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemePTB}[2022/08/07 v2.0.1 PTB (RN)]%
\mode<presentation>
\RequirePackage{varwidth,pict2e,relsize}
\renewcommand*\RSpercentTolerance{0}% exact values by \relscale and the like.
\RequirePackage{tikz}
\newlength\vUnit
\newlength\PTB@textwidth
\newlength\PTB@tempdima
\newlength\PTB@tempdimb
\newlength\PTB@tempdimc
\setbeamersize{text margin left=0.039\paperheight,%
text margin right=0.039\paperheight}
% sometimes \textwidth has the wrong value
\PTB@textwidth=\dimexpr\paperwidth-\beamer@leftmargin-\beamer@rightmargin%
\vUnit=.001\paperheight% For normalization to 1000 height units
\providecommand\PTB@tempa{}
\providecommand\PTB@tempb{}
\providecommand\PTB@tempc{}
\newif\if@PTB@finalpage \@PTB@finalpagefalse
\newif\if@PTB@progressbar \@PTB@progressbarfalse
% From `scrbase.sty'
\newcommand\Ifstr[2]{%
% #1=String1, #2=String2, #3=to do with equality, #4=to do with inequality
\begingroup\protected@edef\reserved@a{#1}\protected@edef\reserved@b{#2}%
\ifx\reserved@a\reserved@b
\endgroup\expandafter\@firstoftwo
\else
\endgroup\expandafter\@secondoftwo
\fi
}
\newcommand\IfIsEmpty[3]{%
\Ifstr{#1}{}{#2}{#3}%
}
\newcommand*\PTB@orgLogo{}
\newcommand*\PTB@contactName{}
\newcommand*\PTB@contactPhone{}
\newcommand*\PTB@contactEMail{}
\newcommand*\PTB@location{}
\newcommand*\orgLogo[1]{%
\gdef\PTB@orgLogo{#1}}
\deftranslation[to = German]{email}{E-Mail}
\deftranslation[to = German]{phone}{Telefon}
\deftranslation[to = German]{NMI}{Nationales Metrologieinstitut}
\deftranslation[to = English]{NMI}{National Metrology Institute}
\usefonttheme{PTB}
\usecolortheme{PTB}
\useinnertheme{PTB}
\useoutertheme{PTB}
\def\beamer@andtitle{\unskip, }
\def\beamer@andinst{\quad}
\newcommand\PTB@header@components{}
\newcommand\PTB@footer@components{}
\newcommand\PTB@frametitle{}
\newcommand\PTB@normal@header{%
\mbox{}\hfill\includegraphics[height=62\vUnit]{PTB-logo-A.mps}%
}
\newcommand\PTB@revers@header{%
\includegraphics[height=62\vUnit]{PTB-logo-A.mps}\hfill\mbox{}%
}
\newcommand\PTB@revers@footer{%
\rlap{\insertshortdate } \hfill% left, wd=0
\insertframenumber\,/\,\inserttotalframenumber \hfill
\llap{\insertshorttitle}% right, wd=0
}
\newcommand\PTB@normal@footer{%
\rlap{\insertshorttitle} \hfill% left aligned, wd=0
\insertframenumber\,/\,\inserttotalframenumber \hfill
\llap{\insertshortdate }% right aligned, wd=0
}
\newcommand*\reverseHeader{%
\global\let\PTB@header@components=\PTB@revers@header
\gdef\PTB@frametitle{\mbox{}\hfill\insertframetitle}%
}
\newcommand*\normalHeader{%
\global\let\PTB@header@components=\PTB@normal@header
\gdef\PTB@frametitle{\insertframetitle}%
}
\newcommand*\reverseFooter{%
\global\let\PTB@footer@components=\PTB@revers@footer
}
\newcommand*\normalFooter{%
\global\let\PTB@footer@components=\PTB@normal@footer
}
\define@key{PTB}{name}{\gdef\PTB@contactName{#1}}
\define@key{PTB}{email}{\gdef\PTB@contactEMail{#1}}
\define@key{PTB}{phone}{\gdef\PTB@contactPhone{#1}}
\define@key{PTB}{location}{\gdef\PTB@location{#1}}
\newcommand*\finalpage[1][]{%
\setkeys{PTB}{#1}%
\global\@PTB@finalpagetrue
}
\newcommand*\useProgressbar{%
\global\@PTB@progressbartrue
}
\normalHeader
\normalFooter
\hypersetup{%
,bookmarks
,colorlinks
,linkcolor=%
,urlcolor=PTBblue
,citecolor=PTBcitecolor,
,breaklinks
,linktocpage
}
\mode<all>
\endinput
%%
%% End of file `beamerthemePTB.sty'.