71 lines
1.8 KiB
TeX
71 lines
1.8 KiB
TeX
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
\ProvidesPackage{projektor}[2023/04/29 Beamer template]
|
|
|
|
% Options
|
|
\newif\ifoption@code
|
|
\DeclareOption{code}{\option@codetrue}
|
|
\newif\ifoption@fr
|
|
\DeclareOption{fr}{\option@frtrue}
|
|
\newif\ifoption@dark
|
|
\DeclareOption{dark}{\option@darktrue}
|
|
|
|
\ProcessOptions
|
|
\ifoption@code
|
|
% Intégration code
|
|
\RequirePackage{minted}
|
|
\usemintedstyle{emacs}
|
|
\fi
|
|
\ifoption@fr
|
|
% Langue
|
|
\RequirePackage[french]{babel}
|
|
\fi
|
|
|
|
% Metropolis + barre de progression + numéro de page
|
|
\usetheme[
|
|
progressbar=frametitle,
|
|
numbering=fraction,
|
|
block=fill
|
|
]{metropolis}
|
|
|
|
|
|
\ifoption@dark
|
|
% Dark theme
|
|
\setbeamercolor{normal text}{fg=white,bg=black!90}
|
|
\setbeamercolor{alerted text}{fg=orange!65!white}
|
|
\setbeamercolor{progress bar}{bg=alerted text.fg!20!black!90}
|
|
\setbeamercolor{frametitle}{bg=black!92}
|
|
\setbeamercolor*{palette primary}{use=structure,fg=structure.fg}
|
|
\else
|
|
% Augmente l'épaisseur de la barre de progression sur les diapos
|
|
\setlength{\metropolis@progressinheadfoot@linewidth}{0.8pt}
|
|
\fi
|
|
|
|
% Resolve issue with overfull vbox
|
|
\def\titlepage{\usebeamertemplate{title page}}
|
|
|
|
% Bas de page
|
|
\setbeamertemplate{frame footer}{
|
|
\insertsection \hfill\hspace{-4em} \insertshorttitle
|
|
}
|
|
\setbeamerfont{page number in head/foot}{size=\tiny}
|
|
\setbeamercolor{footline}{fg=gray}
|
|
|
|
% Enumerate au lieu d'itemize
|
|
\setbeamertemplate{section in toc}[sections numbered]
|
|
|
|
% Police
|
|
\RequirePackage{lmodern}
|
|
|
|
% Inverse titre court/titre long dans le plan
|
|
\RequirePackage{etoolbox}
|
|
\makeatletter
|
|
\patchcmd{\beamer@section}{{#2}{\the\c@page}}{{#1}{\the\c@page}}{}{}
|
|
\patchcmd{\beamer@section}{{\the\c@section}{\secname}}{{\the\c@section}{#1}}{}{}
|
|
\makeatother
|
|
|
|
% Liste sur plusieurs colonnes
|
|
\RequirePackage{multicol}
|
|
|
|
% Pas de préfix pour les figures
|
|
\RequirePackage[figurename=]{caption}
|