| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- % author Matus Necas, October 2026
- % original work by Jan Sumsky <jan.sumsky@gmail.com>, August 2024
- %
- % Description: Beamer footline template configuration and dimension calculations.
- % Handles adaptive footer layouts for title and standard slides,
- % logo positioning, slide numbering, and navigation symbol removal.
- \RequirePackage{calc}
- \RequirePackage{adjustbox}
- \mode<presentation>
- \input{organisation/info.sty}
- % ==============================================================================
- % Footer Dimension & Ratio Calculations
- % ==============================================================================
- % Custom length variables for footer dimensions based on scaled design ratios (128mm / 254mm)
- \newlength{\footlinedp}
- \setlength{\footlinedp}{9.127mm * \ratio{128mm}{254mm}}
- \newlength{\footlineht}
- \setlength{\footlineht}{19.454mm * \ratio{128mm}{254mm}}
- \newlength{\footlinesk}
- \setlength{\footlinesk}{3.338mm * \ratio{128mm}{254mm}}
- % Footer logo width configuration
- \newlength{\logowd}
- \setlength{\logowd}{60.046mm * \ratio{128mm}{254mm}}
- % Declare and scale footer logo image to fit footer height precisely
- \pgfdeclareimage[height=\dimexpr\footlineht + \footlinedp - 2pt\relax]{smalllogo}{\orgLogoFooter}
- % Fixed widths for footer text elements and slide number counters
- \newlength{\footlinetextwd}
- \setlength{\footlinetextwd}{100pt}
- \newlength{\numberwd}
- \setlength{\numberwd}{20pt}
- % Extra right margin offset (used for horizontal alignment correction)
- \def\footextraright{3mm}
- % ==============================================================================
- % Title Slide Toggle & Footline Template
- % ==============================================================================
- % 1. Boolean switch declaration for title slide detection
- \newif\ifuni@onstitle
- \uni@onstitlefalse
- % 2. Unified global Beamer footline template (adapts layout based on \ifuni@onstitle)
- \defbeamertemplate*{footline}{uni}{
- \begin{beamercolorbox}[
- wd=\paperwidth,
- dp=\footlinedp,
- ht=\footlineht,
- leftskip=\footlinesk,
- rightskip=\dimexpr\footlinesk + 3mm\relax
- ]{footline}
- \usebeamerfont{title in head/foot}%
- \ifuni@onstitle
- % --- TITLE SLIDE FOOTER: Logo on left, presentation date on right ---
- \raisebox{\dimexpr 0.5\footlineht - 0.5\footlinedp - 0.5\height\relax}{\pgfuseimage{smalllogo}}%
- \hfill
- \raisebox{\dimexpr 0.5\footlineht - 0.5\footlinedp - 0.5\height\relax}{\insertdate}%
- \else
- % --- STANDARD SLIDE FOOTER: Logo on left, slide number counter on right ---
- \raisebox{\dimexpr 0.5\footlineht - 0.5\footlinedp - 0.5\height\relax}{\pgfuseimage{smalllogo}}%
- \hfill
- \raisebox{\dimexpr 0.5\footlineht - 0.5\footlinedp - 0.5\height\relax}{%
- \makebox[\numberwd][r]{\insertframenumber\,/\,\inserttotalframenumber}%
- }%
- \fi
- \end{beamercolorbox}
- }
- % Remove default Beamer navigation symbols (bottom right corner)
- \defbeamertemplate*{navigation symbols}{uni}{}
- \mode<all>
|