Skip to content

Commit 9d1793e

Browse files
committed
Sync beamer toc partial with Pandoc 3.11 duplicate-TOC fix
Pandoc 3.11 removed a stray block after the TOC frame in default.beamer (jgm/pandoc#11819): a duplicate \setcounter{tocdepth} + \tableofcontents outside the frame followed by an unmatched closing brace. Quarto's wired beamer toc partial carried the same lines. LaTeX tolerates the glitch, so rendered output is unchanged; the port keeps the wired template aligned with the 3.13 reference. Adds a smoke test asserting the generated .tex has no \tableofcontents after the TOC frame's \end{frame}.
1 parent 42cdafe commit 9d1793e

2 files changed

Lines changed: 30 additions & 3 deletions

File tree

‎src/resources/formats/beamer/pandoc/toc.tex‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
\setcounter{tocdepth}{$toc-depth$}
1010
\tableofcontents
1111
\end{frame}
12-
\setcounter{tocdepth}{$toc-depth$}
13-
\tableofcontents
14-
}
1512
$endif$
1613
$if(lof)$
1714
\listoffigures
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "Single TOC in beamer output"
3+
format:
4+
beamer:
5+
toc: true
6+
# render to .tex only, no PDF recipe needed
7+
output-ext: tex
8+
_quarto:
9+
tests:
10+
beamer:
11+
ensureFileRegexMatches:
12+
-
13+
- '\\tableofcontents'
14+
-
15+
# duplicate \tableofcontents outside the frame, removed from
16+
# Pandoc's beamer template in 3.11 (jgm/pandoc#11819)
17+
- '\\end\{frame\}\n\\setcounter\{tocdepth\}\{[0-9]+\}\n\\tableofcontents'
18+
---
19+
20+
# Section One
21+
22+
## Slide A
23+
24+
Content A
25+
26+
# Section Two
27+
28+
## Slide B
29+
30+
Content B

0 commit comments

Comments
 (0)