Add ToC at new section and subsection support
This commit is contained in:
parent
d648760b7a
commit
e2dd2854e1
3 changed files with 93 additions and 0 deletions
|
@ -17,11 +17,14 @@ Options disponibles :
|
|||
| `dark` | Thème sombre |
|
||||
| `code` | Utilisation de `minted` |
|
||||
| `fr` | Utilisation de `babel` |
|
||||
| `sec` | Table des matières lors d'une nouvelle partie |
|
||||
| `subsec` | Table des matières lors d'une nouvelle sous-partie |
|
||||
|
||||
### Avantages
|
||||
|
||||
- Support d'un thème clair et sombre
|
||||
- Support des sous-titres
|
||||
- 2 styles d'affichages des sections
|
||||
|
||||
## [Exemples](./examples)
|
||||
|
||||
|
@ -37,3 +40,8 @@ Options disponibles :
|
|||
| :----------------------------------: | :----------------------------------: |
|
||||
| ![](https://i.imgur.com/NZrsCmO.png) | ![](https://i.imgur.com/mdlvCEX.png) |
|
||||
|
||||
### [Plan à chaque partie](./examples/section.tex)
|
||||
|
||||
| Diapositive | Titre de la partie 1 | Titre de la sous-partie 2 |
|
||||
| :----------------------------------: | :----------------------------------: | :----------------------------------: |
|
||||
| ![](https://i.imgur.com/bAdX4mG.png) | ![](https://i.imgur.com/XEHqmki.png) | ![](https://i.imgur.com/kUMRMrq.png) |
|
||||
|
|
52
examples/section.tex
Normal file
52
examples/section.tex
Normal file
|
@ -0,0 +1,52 @@
|
|||
\documentclass{beamer}
|
||||
|
||||
\usepackage[fr, sec, subsec]{../projektor}
|
||||
|
||||
\title{Titre du document}
|
||||
\author{Auteur du document}
|
||||
\date{Date de rédaction du document}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{frame}[t, plain]{\contentsname}
|
||||
\tableofcontents
|
||||
\end{frame}
|
||||
|
||||
\section{Nom de la partie 1}
|
||||
\begin{frame}{Titre de la Page}
|
||||
Ceci est une liste~:
|
||||
\begin{enumerate}
|
||||
\item Premier élément
|
||||
\item Second élément
|
||||
\end{enumerate}
|
||||
\end{frame}
|
||||
|
||||
\subsection{Nom de la sous-partie 1}
|
||||
\begin{frame}{Titre de la Page}
|
||||
Coucou
|
||||
\end{frame}
|
||||
|
||||
\subsection{Nom de la sous-partie 2}
|
||||
\begin{frame}{Titre de la Page}
|
||||
Coucou
|
||||
\end{frame}
|
||||
|
||||
\section{Nom de la partie 2}
|
||||
\begin{frame}{Titre de la Page}
|
||||
Coucou
|
||||
\end{frame}
|
||||
|
||||
\subsection{Nom de la sous-partie 1}
|
||||
\begin{frame}{Titre de la Page}
|
||||
Coucou
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}[plain, noframenumbering]
|
||||
\begin{center}
|
||||
\Large\textbf{Texte de conclusion}
|
||||
\end{center}
|
||||
\end{frame}
|
||||
|
||||
\end{document}
|
|
@ -9,6 +9,10 @@
|
|||
\DeclareOption{fr}{\option@frtrue}
|
||||
\newif\ifoption@dark
|
||||
\DeclareOption{dark}{\option@darktrue}
|
||||
\newif\ifoption@sec
|
||||
\DeclareOption{sec}{\option@sectrue}
|
||||
\newif\ifoption@subsec
|
||||
\DeclareOption{subsec}{\option@subsectrue}
|
||||
|
||||
\ProcessOptions
|
||||
\ifoption@code
|
||||
|
@ -33,6 +37,35 @@
|
|||
\renewcommand{\contentsname}{Plan}
|
||||
}
|
||||
|
||||
% Styled ToC on new section
|
||||
\ifoption@sec
|
||||
\AtBeginSection[]{%
|
||||
\frame{
|
||||
\frametitle{\contentsname}
|
||||
\tableofcontents[
|
||||
currentsection,
|
||||
subsectionstyle=shaded,
|
||||
]
|
||||
}
|
||||
\addtocounter{framenumber}{-1}
|
||||
}
|
||||
\fi
|
||||
|
||||
% Styled ToC on new subsection
|
||||
\ifoption@subsec
|
||||
\AtBeginSubsection[]{
|
||||
\frame{
|
||||
\frametitle{\contentsname}
|
||||
\tableofcontents[
|
||||
currentsubsection,
|
||||
sectionstyle=show/shaded,
|
||||
subsectionstyle=show/shaded,
|
||||
]
|
||||
}
|
||||
\addtocounter{framenumber}{-1}
|
||||
}
|
||||
\fi
|
||||
|
||||
\ifoption@dark
|
||||
% Thème sombre
|
||||
\setbeamercolor{normal text}{fg=white,bg=black!90}
|
||||
|
|
Loading…
Reference in a new issue