2023-04-30 00:17:48 +02:00
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
|
2023-06-01 09:40:09 +02:00
|
|
|
\ProvidesPackage{projektor}[2023/04/29 Beamer template]
|
2023-04-30 00:17:48 +02:00
|
|
|
|
|
|
|
% Options
|
|
|
|
\newif\ifoption@code
|
|
|
|
\DeclareOption{code}{\option@codetrue}
|
|
|
|
\newif\ifoption@fr
|
|
|
|
\DeclareOption{fr}{\option@frtrue}
|
2023-05-29 18:44:13 +02:00
|
|
|
\newif\ifoption@dark
|
|
|
|
\DeclareOption{dark}{\option@darktrue}
|
2023-12-05 19:05:53 +01:00
|
|
|
\newif\ifoption@sec
|
|
|
|
\DeclareOption{sec}{\option@sectrue}
|
|
|
|
\newif\ifoption@subsec
|
|
|
|
\DeclareOption{subsec}{\option@subsectrue}
|
2023-04-30 00:17:48 +02:00
|
|
|
|
|
|
|
\ProcessOptions
|
|
|
|
\ifoption@code
|
2024-10-09 16:42:00 +02:00
|
|
|
% Intégration code
|
|
|
|
\RequirePackage{minted}
|
|
|
|
\usemintedstyle{emacs}
|
2023-04-30 00:17:48 +02:00
|
|
|
\fi
|
|
|
|
\ifoption@fr
|
2024-10-09 16:42:00 +02:00
|
|
|
% Langue
|
|
|
|
\RequirePackage[french]{babel}
|
|
|
|
\RequirePackage{csquotes}
|
|
|
|
\MakeOuterQuote{"}
|
2023-04-30 00:17:48 +02:00
|
|
|
\fi
|
|
|
|
|
2024-08-22 19:39:56 +02:00
|
|
|
% Moloch avec barre de progression
|
2023-04-30 00:17:48 +02:00
|
|
|
\usetheme[
|
2024-10-09 16:42:00 +02:00
|
|
|
progressbar=frametitle,
|
|
|
|
block=fill,
|
2024-08-22 19:39:56 +02:00
|
|
|
]{moloch}
|
2023-04-30 00:17:48 +02:00
|
|
|
|
2023-12-05 19:36:48 +01:00
|
|
|
% Renomme la table des matières
|
2023-12-05 19:03:46 +01:00
|
|
|
\AtBeginDocument{
|
2024-10-09 16:42:00 +02:00
|
|
|
\renewcommand{\contentsname}{Plan}
|
2023-12-05 19:03:46 +01:00
|
|
|
}
|
2023-05-29 18:44:13 +02:00
|
|
|
|
2023-12-05 19:36:48 +01:00
|
|
|
% Table des matières comme frame de nouvelle partie
|
2023-12-05 19:05:53 +01:00
|
|
|
\ifoption@sec
|
2024-10-09 16:42:00 +02:00
|
|
|
\AtBeginSection[]{
|
|
|
|
\begin{frame}[plain, noframenumbering]{\contentsname}
|
|
|
|
\tableofcontents[
|
|
|
|
currentsection,
|
|
|
|
subsectionstyle=shaded,
|
|
|
|
]
|
|
|
|
\end{frame}
|
|
|
|
}
|
2023-12-05 19:05:53 +01:00
|
|
|
\fi
|
|
|
|
|
2023-12-05 19:36:48 +01:00
|
|
|
% Table des matières comme frame de nouvelle sous-partie
|
2023-12-05 19:05:53 +01:00
|
|
|
\ifoption@subsec
|
2024-10-09 16:42:00 +02:00
|
|
|
\AtBeginSubsection[]{
|
|
|
|
\begin{frame}[plain, noframenumbering]{\contentsname}
|
|
|
|
\tableofcontents[
|
|
|
|
currentsubsection,
|
|
|
|
sectionstyle=show/shaded,
|
|
|
|
subsectionstyle=show/shaded,
|
|
|
|
]
|
|
|
|
\end{frame}
|
|
|
|
}
|
2023-12-05 19:05:53 +01:00
|
|
|
\fi
|
|
|
|
|
2023-05-29 18:44:13 +02:00
|
|
|
\ifoption@dark
|
2024-10-09 16:42:00 +02:00
|
|
|
% Thème sombre
|
|
|
|
\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}
|
2023-05-29 19:35:39 +02:00
|
|
|
\else
|
2024-10-09 16:42:00 +02:00
|
|
|
% Augmente l'épaisseur de la barre de progression sur les diapos
|
|
|
|
\setlength{\moloch@progressinheadfoot@linewidth}{0.8pt}
|
2024-08-22 20:41:43 +02:00
|
|
|
|
2024-10-09 16:42:00 +02:00
|
|
|
% Couleur de la police
|
|
|
|
\setbeamercolor{normal text}{fg=black}
|
2024-08-22 20:41:43 +02:00
|
|
|
|
2024-10-09 16:42:00 +02:00
|
|
|
% Ne change pas les autres couleurs
|
|
|
|
\definecolor{mDarkTeal}{HTML}{23373b}
|
|
|
|
\setbeamercolor{palette primary}{bg=mDarkTeal}
|
2023-05-29 18:44:13 +02:00
|
|
|
\fi
|
|
|
|
|
2023-06-02 18:01:58 +02:00
|
|
|
% Point au lieu de carré dans les listes
|
2023-06-02 17:57:51 +02:00
|
|
|
\setbeamertemplate{itemize items}[circle]
|
|
|
|
|
2024-08-22 19:39:56 +02:00
|
|
|
% Numéros de pages
|
|
|
|
\setbeamertemplate{page number in head/foot}[appendixframenumber]
|
|
|
|
|
2023-06-01 19:51:12 +02:00
|
|
|
% Métadonnées
|
|
|
|
\hypersetup{
|
2024-10-09 16:42:00 +02:00
|
|
|
pdfsubject={Présentation},
|
|
|
|
pdfkeywords={presentation},
|
|
|
|
pdfcreator={LaTeX with Beamer class and projektor template}
|
2023-06-01 19:51:12 +02:00
|
|
|
}
|
|
|
|
|
2023-05-29 19:42:56 +02:00
|
|
|
% Bas de page
|
2023-04-30 00:17:48 +02:00
|
|
|
\setbeamertemplate{frame footer}{
|
2024-10-09 16:42:00 +02:00
|
|
|
\makebox[0pt][l]{\insertsection} \hfill
|
|
|
|
\makebox[0pt][c]{\insertshorttitle}
|
2023-04-30 00:17:48 +02:00
|
|
|
}
|
|
|
|
\setbeamerfont{page number in head/foot}{size=\tiny}
|
|
|
|
\setbeamercolor{footline}{fg=gray}
|
|
|
|
|
2024-08-22 23:17:52 +02:00
|
|
|
% Enumerate au lieu d'itemize, et itemize les sous sections
|
2023-04-30 00:17:48 +02:00
|
|
|
\setbeamertemplate{section in toc}[sections numbered]
|
2024-08-22 23:17:52 +02:00
|
|
|
\setbeamertemplate{subsection in toc}{\quad$\bullet$\enspace\inserttocsubsection\par}
|
2023-04-30 00:17:48 +02:00
|
|
|
|
|
|
|
% Police
|
2024-08-22 19:39:56 +02:00
|
|
|
\RequirePackage{microtype}
|
2023-04-30 00:17:48 +02:00
|
|
|
\RequirePackage{lmodern}
|
|
|
|
|
|
|
|
% Inverse titre court/titre long dans le plan
|
|
|
|
\makeatletter
|
|
|
|
\patchcmd{\beamer@section}{{#2}{\the\c@page}}{{#1}{\the\c@page}}{}{}
|
|
|
|
\patchcmd{\beamer@section}{{\the\c@section}{\secname}}{{\the\c@section}{#1}}{}{}
|
|
|
|
\makeatother
|
|
|
|
|
2023-05-29 19:42:56 +02:00
|
|
|
% Liste sur plusieurs colonnes
|
|
|
|
\RequirePackage{multicol}
|
|
|
|
|
|
|
|
% Pas de préfix pour les figures
|
|
|
|
\RequirePackage[figurename=]{caption}
|
2023-06-01 19:33:44 +02:00
|
|
|
|
2024-08-22 19:39:56 +02:00
|
|
|
% Sous-titres
|
2023-06-01 19:33:44 +02:00
|
|
|
\setbeamerfont{framesubtitle}{series=\mdseries}
|
2023-12-13 16:10:28 +01:00
|
|
|
|
|
|
|
% Souligne mieux les mots
|
|
|
|
\newcommand{\ul}[1]{\underline{\smash{#1}}}
|
2024-02-01 14:42:18 +01:00
|
|
|
|
2024-08-22 23:20:44 +02:00
|
|
|
% Met en surbrillance du texte
|
2024-08-23 00:12:01 +02:00
|
|
|
\newcommand{\hl}[2][yellow]{\fboxsep0pt{\pgfsetfillopacity{0.5}\colorbox{#1}{\pgfsetfillopacity{1}\strut#2}}}
|
2024-08-22 23:20:44 +02:00
|
|
|
|
2024-02-01 14:42:18 +01:00
|
|
|
% Avertissement par rapport à l'appendix
|
|
|
|
\renewcommand\appendixname{Appendix}
|