Skip to content

Commit 6b363d9

Browse files
authored
Merge pull request #10840 from quarto-dev/chore/1.6-pandoc-update
Chore: Update to Pandoc 3.4
2 parents 1bc1695 + dbe086c commit 6b363d9

File tree

30 files changed

+173
-75
lines changed

30 files changed

+173
-75
lines changed

configuration

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
export DENO=v1.41.0
1212
# TODO figure out where 0.1.41 apple silicon libs are available
1313
export DENO_DOM=v0.1.35-alpha-artifacts
14-
export PANDOC=3.2
14+
export PANDOC=3.4
1515
export DARTSASS=1.70.0
1616
export ESBUILD=0.19.12
1717
export TYPST=0.11.0

dev-docs/feature-format-matrix/qmd-files/raw-blocks/interpreted/pandoc-native/document.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ _quarto:
2525
html:
2626
ensureHtmlElements:
2727
-
28-
- 'table.table'
28+
- 'table'
2929
- []
3030
typst:
3131
ensureTypstFileRegexMatches:

dev-docs/update-pandoc-checklist.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
## Updating the bundled version of Pandoc
22

3-
- [ ] If needed, ask JJ to upgrade our archives
4-
- [ ] Run `./package/src/quarto-bld update-pandoc PANDOC_VERSION`
3+
Carlos needs to run this:
4+
5+
- [ ] Ensure archives are upgraded
6+
- [ ] Run `AWS_PROFILE=... ./package/src/quarto-bld update-pandoc PANDOC_VERSION`
57
- [ ] look at `git diff`, specifically for changes in Pandoc templates, and adjust as needed.
68

79
## Manual steps

src/resources/formats/html/_quarto-rules.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ tr.header > th > p:last-of-type {
227227
margin-bottom: 0px;
228228
}
229229

230-
table,
231-
table.table {
230+
table {
232231
margin-top: 0.5rem;
233232
margin-bottom: 0.5rem;
234233
}

src/resources/formats/html/pandoc/html.styles

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ table {
144144
font-variant-numeric: lining-nums tabular-nums;
145145
}
146146
table caption {
147+
$if(table-caption-below)$
148+
caption-side: bottom;
149+
margin-top: 0.75em;
150+
$else$
147151
margin-bottom: 0.75em;
152+
$endif$
148153
}
149154
tbody {
150155
margin-top: 0.5em;

src/resources/formats/html/pandoc/html.template

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ $for(header-includes)$
2727
$header-includes$
2828
$endfor$
2929
$if(math)$
30-
$if(mathjax)$
31-
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
32-
$endif$
3330
$math$
3431
$endif$
3532
</head>

src/resources/formats/jats/pandoc/default-templates/default.jats_articleauthoring

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ $if(article.funding-statement)$
9191
<funding-statement>$article.funding-statement$</funding-statement>
9292
</funding-group>
9393
$endif$
94+
$if(supplementary-material)$
95+
<supplementary-material>
96+
$supplementary-material$
97+
</supplementary-material>
98+
$endif$
9499
</article-meta>
95100
</front>
96101
<body>

src/resources/formats/pdf/pandoc/doc-class.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
$if(aspectratio)$
1414
aspectratio=$aspectratio$,
1515
$endif$
16+
$if(babel-lang)$
17+
$babel-lang$,
18+
$endif$
1619
$endif$
1720
$for(classoption)$
1821
$classoption$$sep$,
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
$if(graphics)$
22
\usepackage{graphicx}
33
\makeatletter
4-
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
5-
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
6-
\makeatother
7-
% Scale images if necessary, so that they will not overflow the page
8-
% margins by default, and it is still possible to overwrite the defaults
9-
% using explicit options in \includegraphics[width, height, ...]{}
10-
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
4+
\newsavebox\pandoc@box
5+
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
6+
\sbox\pandoc@box{#1}%
7+
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
8+
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
9+
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
10+
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
11+
\else\usebox{\pandoc@box}%
12+
\fi%
13+
}
1114
% Set default figure placement to htbp
12-
\makeatletter
1315
\def\fps@figure{htbp}
1416
\makeatother
15-
$endif$
17+
$endif$

src/resources/formats/pdf/pandoc/latex.template

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ $endif$
2323
$if(aspectratio)$
2424
aspectratio=$aspectratio$,
2525
$endif$
26+
$if(babel-lang)$
27+
$babel-lang$,
28+
$endif$
2629
$endif$
2730
$for(classoption)$
2831
$classoption$$sep$,
@@ -57,13 +60,13 @@ $if(section-titles)$
5760
}
5861
\setbeamertemplate{section page}{
5962
\centering
60-
\begin{beamercolorbox}[sep=12pt,center]{part title}
63+
\begin{beamercolorbox}[sep=12pt,center]{section title}
6164
\usebeamerfont{section title}\insertsection\par
6265
\end{beamercolorbox}
6366
}
6467
\setbeamertemplate{subsection page}{
6568
\centering
66-
\begin{beamercolorbox}[sep=8pt,center]{part title}
69+
\begin{beamercolorbox}[sep=8pt,center]{subsection title}
6770
\usebeamerfont{subsection title}\insertsubsection\par
6871
\end{beamercolorbox}
6972
}
@@ -299,15 +302,17 @@ $endif$
299302
$if(graphics)$
300303
\usepackage{graphicx}
301304
\makeatletter
302-
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
303-
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
304-
\makeatother
305-
% Scale images if necessary, so that they will not overflow the page
306-
% margins by default, and it is still possible to overwrite the defaults
307-
% using explicit options in \includegraphics[width, height, ...]{}
308-
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
305+
\newsavebox\pandoc@box
306+
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
307+
\sbox\pandoc@box{#1}%
308+
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
309+
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
310+
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
311+
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
312+
\else\usebox{\pandoc@box}%
313+
\fi%
314+
}
309315
% Set default figure placement to htbp
310-
\makeatletter
311316
\def\fps@figure{htbp}
312317
\makeatother
313318
$endif$
@@ -440,13 +445,15 @@ $endfor$
440445
% get rid of language-specific shorthands (see #6817):
441446
\let\LanguageShortHands\languageshorthands
442447
\def\languageshorthands#1{}
448+
$if(selnolig-langs)$
449+
\ifLuaTeX
450+
\usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures
451+
\fi
452+
$endif$
443453
$endif$
444454
$for(header-includes)$
445455
$header-includes$
446456
$endfor$
447-
\ifLuaTeX
448-
\usepackage{selnolig} % disable illegal ligatures
449-
\fi
450457
$if(dir)$
451458
\ifPDFTeX
452459
\TeXXeTstate=1
@@ -534,7 +541,7 @@ $if(institute)$
534541
\institute{$for(institute)$$institute$$sep$ \and $endfor$}
535542
$endif$
536543
$if(titlegraphic)$
537-
\titlegraphic{\includegraphics{$titlegraphic$}}
544+
\titlegraphic{\includegraphics$if(titlegraphicoptions)$[$for(titlegraphicoptions)$$titlegraphicoptions$$sep$, $endfor$]$endif${$titlegraphic$}}
538545
$endif$
539546
$if(logo)$
540547
\logo{\includegraphics{$logo$}}
@@ -571,7 +578,8 @@ $if(beamer)$
571578
$if(toc-title)$
572579
\frametitle{$toc-title$}
573580
$endif$
574-
\tableofcontents[hideallsubsections]
581+
\setcounter{tocdepth}{$toc-depth$}
582+
\tableofcontents
575583
\end{frame}
576584
$else$
577585
{

0 commit comments

Comments
 (0)