diff options
author | admin <admin@optics-design.com> | 2025-07-26 12:04:03 +0200 |
---|---|---|
committer | admin <admin@optics-design.com> | 2025-07-26 12:04:03 +0200 |
commit | fc7bb7f3fc85a1322b3a1761632bb2d853a10f21 (patch) | |
tree | b5dce88645249d58903a94e4024d7ef38911cece /beamerthemeOptics.sty |
Initial commit
Diffstat (limited to 'beamerthemeOptics.sty')
-rw-r--r-- | beamerthemeOptics.sty | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/beamerthemeOptics.sty b/beamerthemeOptics.sty new file mode 100644 index 0000000..b363865 --- /dev/null +++ b/beamerthemeOptics.sty @@ -0,0 +1,193 @@ +% Optics Beamer Theme +% Author: admin +% Usage: \usetheme{Optics} +% Optics Beamer Theme +% Professional minimal theme which I use for optics presentations +% Author: admin +% Usage: \usetheme{Optics} + + +\mode<presentation> +\usepackage[default]{lato} +\usepackage[T1]{fontenc} + +% Base theme +\usetheme{default} +\usecolortheme{default} + +% Improved color palette +\definecolor{primary}{RGB}{20,40,120} % Darker blue for better contrast +\definecolor{secondary}{RGB}{95,95,95} % Professional gray +\definecolor{accent}{RGB}{0,82,155} % Accessible blue +\definecolor{lightgray}{RGB}{248,249,250} % Very light gray for backgrounds + +% Keep original darkblue for compatibility +\definecolor{darkblue}{RGB}{20,40,120} +\newcommand{\descr}[1]{{\footnotesize\color{secondary}#1}} + +% Remove navigation symbols +\setbeamertemplate{navigation symbols}{} +% Captions +\setbeamerfont{caption}{size=\tiny} +\setbeamerfont{caption name}{size=\tiny} +\setbeamertemplate{caption}{\tiny\color{darkblue}\insertcaptionname~\insertcaptionnumber: \color{black}\insertcaption} +\setlength{\abovecaptionskip}{-6pt} +\setlength{\belowcaptionskip}{6pt} + +% Clean header with presentation title in dark blue +\setbeamertemplate{headline}{% + \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1ex]{title in head/foot}% + \usebeamerfont{title in head/foot}% + \begin{minipage}[c]{0.5\paperwidth}% + \color{darkblue}\hspace{1em}\insertsection% + \end{minipage}% + \begin{minipage}[c]{0.5\paperwidth}% + \raggedleft% + \ifnum\value{framenumber}>1% Only show author after title page + \color{darkblue}% + \ifx\insertemail\empty% + \insertauthor\hspace{1em}% + \else% + \href{mailto:\insertemail}{\faEnvelope\ \insertauthor}\hspace{1em}% + \fi% + \fi% + \end{minipage}% + \end{beamercolorbox}% + \vskip0pt% + % \begin{beamercolorbox}[wd=\paperwidth,ht=0.5pt]{primary}% + % \color{darkblue}\hrule height 0.5pt% + % \end{beamercolorbox}% +} + +% Custom command for location +\newcommand{\location}[1]{\def\insertlocation{#1}} +\location{} % Default empty +\newcommand{\email}[1]{\def\insertemail{#1}} +\email{} % Default empty + +% Custom title page with location +\setbeamertemplate{title page}{% + \vbox{} + \vfill + \begingroup + \centering + \begin{beamercolorbox}[sep=8pt,center]{title} + \usebeamerfont{title}\color{darkblue}\bfseries\inserttitle\par% + \ifx\insertsubtitle\@empty% + \else% + \vskip0.25em% + {\usebeamerfont{subtitle}\insertsubtitle\par}% + \fi% + \end{beamercolorbox}% + \vskip1em\par + \begin{beamercolorbox}[sep=8pt,center]{author} + \usebeamerfont{author}% + \ifx\insertemail\empty% + \insertauthor% + \else% + \href{mailto:\insertemail}{\faEnvelope\ \insertauthor}% + \fi% + \end{beamercolorbox} + \begin{beamercolorbox}[sep=8pt,center]{date} + \usebeamerfont{date}\textit{\insertdate} + \ifx\insertlocation\empty% + \else% + \par\vskip0.25em% + \insertlocation% + \fi% + \end{beamercolorbox} + \endgroup + \vfill +} + +% Enhanced footer with title, date, location, and page numbers +\setbeamertemplate{footline}{% + \begin{beamercolorbox}[wd=\paperwidth,ht=0.5pt]{primary}% + \color{darkblue}\hrule height 0.5pt% + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1ex]{title in head/foot}% + \usebeamerfont{title in head/foot}% + \color{secondary}% + \begin{minipage}[c]{0.33\paperwidth}% + \hspace{1em}\insertshorttitle% + \end{minipage}% + \begin{minipage}[c]{0.34\paperwidth}% + \centering% + \ifx\insertlocation\empty% + \insertdate% + \else% + \insertdate\ $\cdot$ \insertlocation% + \fi% + \end{minipage}% + \begin{minipage}[c]{0.33\paperwidth}% + \raggedleft% + \insertframenumber{} / \inserttotalframenumber\hspace{1em}% + \end{minipage}% + \end{beamercolorbox}% +} + +% Frame title with dark blue and underline +% Fixed positioning for consistency +\setbeamertemplate{frametitle}{% + \nointerlineskip% + \begin{beamercolorbox}[wd=\paperwidth,ht=2.2ex,dp=0.8ex,leftskip=1em]{frametitle}% + \usebeamerfont{frametitle}\color{darkblue}\bfseries\Large\insertframetitle% + \end{beamercolorbox}% + \nointerlineskip% + \begin{beamercolorbox}[wd=\paperwidth,ht=0.1pt,dp=0pt,leftskip=1em,rightskip=1em]{frametitle}% + \color{darkblue}\hrule height 0.8pt% + \end{beamercolorbox}% + \vspace{-0.8em}% +} + +% List items +\setbeamertemplate{itemize item}{\raisebox{0.2ex}{\textcolor{accent}{\rule{0.4em}{0.4em}}}\hspace{0.3em}} +\setbeamertemplate{itemize subitem}{\raisebox{0.2ex}{\textcolor{darkblue}{\textbullet}}\hspace{0.3em}} +\setbeamertemplate{itemize subsubitem}{\raisebox{0.1ex}{\textcolor{darkblue}{--}}\hspace{0.3em}} + +% Improved spacing for readability +\setlength{\leftmargini}{1.5em} +\setlength{\leftmarginii}{1.2em} +\setbeamertemplate{itemize/enumerate body begin}{\vspace{0.5em}} +\setbeamertemplate{itemize/enumerate body end}{\vspace{0.3em}} + +% Add space between items +\let\olditem\item +\renewcommand{\item}{\olditem\vspace{0.4em}} + +% Table of contents customization +\setbeamertemplate{section in toc}{\Large\bfseries\color{darkblue}\inserttocsection} +\setbeamertemplate{section in toc shaded}{\Large\bfseries\color{secondary}\inserttocsection} +\setbeamertemplate{subsection in toc}{\normalsize\par\hspace{1.2em}$\bullet$~\inserttocsubsection} +\setbeamertemplate{subsection in toc shaded}{\normalsize\par\hspace{1.2em}\color{secondary}$\bullet$~\inserttocsubsection} + +% Color Scheme +\setbeamercolor{title}{fg=darkblue} +\setbeamercolor{frametitle}{fg=darkblue,bg=white} +\setbeamercolor{normal text}{fg=black,bg=white} +\setbeamercolor{item}{fg=darkblue} +\setbeamercolor{title in head/foot}{fg=darkblue} + +% Bibliography formatting +\setbeamercolor{bibliography entry author}{fg=darkblue} +\setbeamercolor{bibliography entry title}{fg=black} +\setbeamercolor{bibliography entry location}{fg=gray} +\setbeamercolor{bibliography entry note}{fg=gray} +\setbeamertemplate{bibliography item}{\insertbiblabel} + +\AtBeginSection[ ] +{ +\begingroup +\def\insertsection{} +\begin{frame}{Contents} + \tableofcontents[currentsection,hideallsubsections] +\end{frame} +\endgroup +} +\addtobeamertemplate{frame begin}{% + \ifx\insertsubsectionhead\empty% + \else% + \frametitle{\insertsubsectionhead}% + \fi% +}{} +\mode<all> |