From 422549f8eb1c168a322003087b5b46ec740d638e Mon Sep 17 00:00:00 2001 From: Lukas Pietzschmann Date: Sun, 25 Dec 2022 11:29:54 +0100 Subject: [PATCH] Added automatically inserted toc --- README.md | 1 + beamerthemeawesome.sty | 7 +++++++ example.tex | 4 ---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e16775c..3e16263 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Just copy and paste `beamerthemeawesome.sty` into your project, add `\usetheme{a This theme provides some settings you can tweak: - Language: Possible values are `english` or `german`. This changes the value passed to babel and csquotes. If none of both is selected, `german` is used. - Extra slides: For each section and subsection an extra slide containing the title can be inserted. This is controlled by passing `secslide` or/and `subsecslide`. The absence of `secslide` indicates that you don't want an extra slide for every section. Analog for `subsecslide`. +- Automatic toc: A table of contents is automatically inserted with the `\maketitle` command (After the title slide). If you want to disable this behavior, you have to set the `notoc` option. If you wanna set one (or more) of those values, you have to pass it to `\usetheme`. Look at ![example.tex](https://github.com/LukasPietzschmann/awesome-beamer/blob/master/example.tex) for, well, an example. diff --git a/beamerthemeawesome.sty b/beamerthemeawesome.sty index d3a5c0a..4594767 100644 --- a/beamerthemeawesome.sty +++ b/beamerthemeawesome.sty @@ -18,6 +18,7 @@ \awesome@english@false } +\DeclareBoolOption{notoc} \DeclareBoolOption{secslide} \DeclareBoolOption{subsecslide} @@ -111,6 +112,12 @@ \begin{frame}[noframenumbering, plain] \titlepage \end{frame} + + \ifawesome@notoc\else + \begin{frame}{Agenda} + \tableofcontents + \end{frame} + \fi } \renewcommand{\ULdepth}{1.8pt} diff --git a/example.tex b/example.tex index ec80e35..428e9de 100644 --- a/example.tex +++ b/example.tex @@ -18,10 +18,6 @@ \maketitle -\begin{frame}{Agenda} - \tableofcontents -\end{frame} - \section{Section 1} \begin{frame}{Example Slide}{With a subtitle} \begin{columns}[t]