Closed Thanatos0173 closed 3 months ago
default latex template has:
$if(beamer)$
\begin{frame}[allowframebreaks]
$if(toc-title)$
\frametitle{$toc-title$}
$endif$
\tableofcontents[hideallsubsections]
\end{frame}
$else$
{
$if(colorlinks)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$}
$endif$
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
}
$endif$
So, the \setcounter{tocdepth}{$toc-depth$}
is only set for latex output, not for beamer.
For beamer, we have the [hideallsubsections]
option hard-coded.
I can't remember the rationale, if any, for these decisions.
One important thing to note: in your example, slide level = 2 (see the manual for this concept). That means that the level-2 headings do not create subsections; they create slides. So, even remove [hideallsubsections]
, you'd only get the top level in your toc.
Perhaps a better test case is
---
title: Title
subtitle: Subtitle
lang: fr-FR
author: "Author"
theme: "Boadilla"
colortheme: "dolphin"
fonttheme: "structurebold"
aspectratio: 43
fontsize: 14pt
linkstyle: bold
---
# Section One
## Subsection One
### Slide
Content
## Subsection Two
### Another slide
Content
# Section Two
## Subsection One
### Slide title
Content
## Subsection Two
### Another slide title
Content
I think I'll change this so it uses toc-depth
like the regular LaTeX template.
So, just to be sure, I can't change the way the toc is generated because I'm using beamer ? Or do I need to change the default latex template to be able to show more information in the toc ?
You'd have to change the latex template, yes. The commit noted above does this, so you can just grab the new template from there.
Ok, thank you very much !
Bad fix! This breaks all my coding, because I do not want subsections in toc. Beamer does not care about toc-dept. - So this might be a bad solution.
@NMarkgraf can you elaborate? Setting toc-depth
has no effect in beamer?
@NMarkgraf In my tests, --toc-depth
seems to work properly with beamer. If you think this is not the case, please give full instructions for reproducing the issue.
Reproducible steps :
Section One
Subsection One
Content
Subsection Two
Content
Section Two
Subsection One
Content
Subsection Two
Content
Output: The toc slide is :
Expected: The toc slide should be:
Version :
OS : Linux, Archcraft