Skip to content

Commit 5b5c879

Browse files
committed
latex/beamer: port Pandoc 3.13 caption setup, drop footnotehyper longtable hook
Pandoc's common.latex loads the caption package and sets \captionsetup[table]{skip=6pt} under $if(tables)$ (since 3.10.1), and removes the footnotehyper/footnote \makesavenoteenv{longtable} block (3.12): the LaTeX writer now generates footnotes in longtable manually like floating tables (jgm/pandoc#11857), which also resolves the endfloat incompatibility that motivated Quarto's #14741 test. Port both changes into the wired pdf and beamer tables.tex partials. The beamer branch already loaded caption, and crossref's injected \@ifpackageloaded guard makes the now-unconditional top-level load a no-op when crossref runs first, so there is no option-clash risk. Verified: pdf (scrartcl) and beamer docs with crossref tables compile; smoke-all 14741/14741-knitr, caption-footnotes, issue-4748, 9593, crossref tables/latex and render-latex-output tests pass.
1 parent 0fc3275 commit 5b5c879

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎llm-docs/pandoc-quarto-latex-templates.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Pandoc's `common.latex` is copied as `latex.common`; Quarto maintains its own `c
120120

121121
| File | Purpose |
122122
| ---------------- | --------------------------------------------------------------------------- |
123-
| `tables.tex` | Table packages (longtable, booktabs, array, multirow) and footnote handling |
123+
| `tables.tex` | Table packages (longtable, booktabs, array, multirow) and caption setup |
124124
| `graphics.tex` | graphicx package and `\pandocbounded` command for auto-scaling images |
125125
| `citations.tex` | CSL citation definitions (`\citeproc`, `CSLReferences` environment) |
126126
| `babel-lang.tex` | Babel language configuration and font setup |

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
$--
44
$if(tables)$
55
\usepackage{longtable,booktabs,array}
6+
\usepackage{caption}
7+
\captionsetup[table]{skip=6pt}
68
\newcounter{none} % for unnumbered tables
79
$if(multirow)$
810
\usepackage{multirow}
@@ -20,8 +22,5 @@
2022
\makeatletter
2123
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
2224
\makeatother
23-
% Allow footnotes in longtable head/foot
24-
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
25-
\makesavenoteenv{longtable}
2625
$endif$
2726
$endif$

‎src/resources/formats/pdf/pandoc/tables.tex‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
$--
44
$if(tables)$
55
\usepackage{longtable,booktabs,array}
6+
\usepackage{caption}
7+
\captionsetup[table]{skip=6pt}
68
\newcounter{none} % for unnumbered tables
79
$if(multirow)$
810
\usepackage{multirow}
@@ -20,8 +22,5 @@
2022
\makeatletter
2123
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
2224
\makeatother
23-
% Allow footnotes in longtable head/foot
24-
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
25-
\makesavenoteenv{longtable}
2625
$endif$
2726
$endif$

0 commit comments

Comments
 (0)