From dd846a6cb781f716f48de96727c2858991eee14c Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Wed, 20 Aug 2025 07:53:09 -0500 Subject: [PATCH 1/5] [deps] Pandoc 3.7.0.2 --- configuration | 2 +- dev-docs/update-pandoc-checklist.md | 24 +++++++++++++++++-- .../formats/beamer/pandoc/babel-lang.tex | 11 +++------ .../formats/beamer/pandoc/latex.common | 11 +++------ .../default-templates/article.jats_publishing | 2 +- .../default.jats_articleauthoring | 2 +- .../formats/pdf/pandoc/babel-lang.tex | 11 +++------ src/resources/formats/pdf/pandoc/latex.common | 11 +++------ 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/configuration b/configuration index ce385a08c30..5a2cfa2b258 100644 --- a/configuration +++ b/configuration @@ -14,7 +14,7 @@ export DENO=v2.3.1 # TODO figure out where 0.1.41 apple silicon libs are available export DENO_DOM=v0.1.41-alpha-artifacts -export PANDOC=3.6.3 +export PANDOC=3.7.0.2 export DARTSASS=1.87.0 export ESBUILD=0.25.3 export TYPST=0.13.0 diff --git a/dev-docs/update-pandoc-checklist.md b/dev-docs/update-pandoc-checklist.md index ac3115da0ad..e59a80321d1 100644 --- a/dev-docs/update-pandoc-checklist.md +++ b/dev-docs/update-pandoc-checklist.md @@ -2,10 +2,30 @@ Carlos needs to run this: -- [ ] Ensure archives are upgraded -- [ ] Run `AWS_PROFILE=... ./package/src/quarto-bld update-pandoc PANDOC_VERSION` +- [x] Ensure archives are upgraded +- [x] Run `AWS_PROFILE=... ./package/src/quarto-bld update-pandoc PANDOC_VERSION` - [ ] look at `git diff`, specifically for changes in Pandoc templates, and adjust as needed. +As a reminder, our templates are kept in the same directories as Pandoc's templates, but with different names. `git diff` will show the diff in Pandoc's template; we have to manually patch +ours. (We can't just use `patch` because the templates have diverged too much) + +### Pandoc templates + +The general rule for the naming is that "format.template" indicates Pandoc naming, and "template.format" indicates ours. Examples below: + +#### beamer + +- Pandoc's: src/resources/formats/beamer/pandoc/beamer.template +- Ours: src/resources/formats/beamer/pandoc/template.tex + +Partials: + +- Pandoc's: + - src/resources/formats/beamer/pandoc/latex.common +- Ours: + - src/resources/formats/beamer/pandoc/common.latex + + ## Manual steps - [ ] Update schemas by inspecting [their changelog](https://github.com/jgm/pandoc/blob/main/changelog.md) for new commands, deprecation removals, etc diff --git a/src/resources/formats/beamer/pandoc/babel-lang.tex b/src/resources/formats/beamer/pandoc/babel-lang.tex index f29c833cb1e..ad1cc90c499 100644 --- a/src/resources/formats/beamer/pandoc/babel-lang.tex +++ b/src/resources/formats/beamer/pandoc/babel-lang.tex @@ -3,9 +3,9 @@ $-- $if(lang)$ \ifLuaTeX -\usepackage[bidi=basic$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=basic,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \else -\usepackage[bidi=default$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=default,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \fi $if(babel-lang)$ $if(mainfont)$ @@ -18,12 +18,7 @@ $for(babelfonts/pairs)$ \babelfont[$babelfonts.key$]{rm}{$babelfonts.value$} $endfor$ -% get rid of language-specific shorthands (see #6817): -\let\LanguageShortHands\languageshorthands -\def\languageshorthands#1{} -$if(selnolig-langs)$ \ifLuaTeX - \usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures + \usepackage{selnolig} % disable illegal ligatures \fi -$endif$ $endif$ \ No newline at end of file diff --git a/src/resources/formats/beamer/pandoc/latex.common b/src/resources/formats/beamer/pandoc/latex.common index 3f93b1b883a..cb745941de6 100644 --- a/src/resources/formats/beamer/pandoc/latex.common +++ b/src/resources/formats/beamer/pandoc/latex.common @@ -183,9 +183,9 @@ $-- Babel language support $-- $if(lang)$ \ifLuaTeX -\usepackage[bidi=basic$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=basic,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \else -\usepackage[bidi=default$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=default,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \fi $if(babel-lang)$ $if(mainfont)$ @@ -198,15 +198,10 @@ $endif$ $for(babelfonts/pairs)$ \babelfont[$babelfonts.key$]{rm}{$babelfonts.value$} $endfor$ -% get rid of language-specific shorthands (see #6817): -\let\LanguageShortHands\languageshorthands -\def\languageshorthands#1{} -$if(selnolig-langs)$ \ifLuaTeX - \usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures + \usepackage{selnolig} % disable illegal ligatures \fi $endif$ -$endif$ $-- $-- pagestyle $-- diff --git a/src/resources/formats/jats/pandoc/default-templates/article.jats_publishing b/src/resources/formats/jats/pandoc/default-templates/article.jats_publishing index d402b8bbd39..b33263cfd33 100644 --- a/src/resources/formats/jats/pandoc/default-templates/article.jats_publishing +++ b/src/resources/formats/jats/pandoc/default-templates/article.jats_publishing @@ -98,7 +98,7 @@ $if(author.surname)$ $if(author.non-dropping-particle)$${author.non-dropping-particle} $endif$$author.surname$ $author.given-names$$if(author.dropping-particle)$ ${author.dropping-particle}$endif$ $if(author.prefix)$ -${author.suffix} +${author.prefix} $endif$ $if(author.suffix)$ ${author.suffix} diff --git a/src/resources/formats/jats/pandoc/default-templates/default.jats_articleauthoring b/src/resources/formats/jats/pandoc/default-templates/default.jats_articleauthoring index 627911ae516..5a4fa212872 100644 --- a/src/resources/formats/jats/pandoc/default-templates/default.jats_articleauthoring +++ b/src/resources/formats/jats/pandoc/default-templates/default.jats_articleauthoring @@ -31,7 +31,7 @@ $if(author.surname)$ $if(author.non-dropping-particle)$${author.non-dropping-particle} $endif$${author.surname} ${author.given-names}$if(author.dropping-particle)$ ${author.dropping-particle}$endif$ $if(author.prefix)$ -${author.suffix} +${author.prefix} $endif$ $if(author.suffix)$ ${author.suffix} diff --git a/src/resources/formats/pdf/pandoc/babel-lang.tex b/src/resources/formats/pdf/pandoc/babel-lang.tex index f29c833cb1e..ad1cc90c499 100644 --- a/src/resources/formats/pdf/pandoc/babel-lang.tex +++ b/src/resources/formats/pdf/pandoc/babel-lang.tex @@ -3,9 +3,9 @@ $-- $if(lang)$ \ifLuaTeX -\usepackage[bidi=basic$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=basic,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \else -\usepackage[bidi=default$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=default,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \fi $if(babel-lang)$ $if(mainfont)$ @@ -18,12 +18,7 @@ $for(babelfonts/pairs)$ \babelfont[$babelfonts.key$]{rm}{$babelfonts.value$} $endfor$ -% get rid of language-specific shorthands (see #6817): -\let\LanguageShortHands\languageshorthands -\def\languageshorthands#1{} -$if(selnolig-langs)$ \ifLuaTeX - \usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures + \usepackage{selnolig} % disable illegal ligatures \fi -$endif$ $endif$ \ No newline at end of file diff --git a/src/resources/formats/pdf/pandoc/latex.common b/src/resources/formats/pdf/pandoc/latex.common index 3f93b1b883a..cb745941de6 100644 --- a/src/resources/formats/pdf/pandoc/latex.common +++ b/src/resources/formats/pdf/pandoc/latex.common @@ -183,9 +183,9 @@ $-- Babel language support $-- $if(lang)$ \ifLuaTeX -\usepackage[bidi=basic$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=basic,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \else -\usepackage[bidi=default$for(babeloptions)$,$babeloptions$$endfor$]{babel} +\usepackage[bidi=default,shorthands=off,$for(babeloptions)$,$babeloptions$$endfor$]{babel} \fi $if(babel-lang)$ $if(mainfont)$ @@ -198,15 +198,10 @@ $endif$ $for(babelfonts/pairs)$ \babelfont[$babelfonts.key$]{rm}{$babelfonts.value$} $endfor$ -% get rid of language-specific shorthands (see #6817): -\let\LanguageShortHands\languageshorthands -\def\languageshorthands#1{} -$if(selnolig-langs)$ \ifLuaTeX - \usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures + \usepackage{selnolig} % disable illegal ligatures \fi $endif$ -$endif$ $-- $-- pagestyle $-- From f64bedc7e921c3319b71ad9cd56165a0152f411d Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Sat, 13 Dec 2025 14:09:28 -0600 Subject: [PATCH 2/5] Pandoc binary dep -> 3.8.3 --- configuration | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration b/configuration index 73c4ac13bc1..cceb10bc415 100644 --- a/configuration +++ b/configuration @@ -14,7 +14,7 @@ export DENO=v2.4.5 # TODO figure out where 0.1.41 apple silicon libs are available export DENO_DOM=v0.1.41-alpha-artifacts -export PANDOC=3.7.0.2 +export PANDOC=3.8.3 export DARTSASS=1.87.0 export ESBUILD=0.25.10 export TYPST=0.13.0 From 4374e9292ee7020bd8e716552e7ac5be5d2c0cd7 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Sat, 13 Dec 2025 16:36:02 -0600 Subject: [PATCH 3/5] typst -> 0.14.2 --- configuration | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration b/configuration index cceb10bc415..fa8bac417cb 100644 --- a/configuration +++ b/configuration @@ -17,7 +17,7 @@ export DENO_DOM=v0.1.41-alpha-artifacts export PANDOC=3.8.3 export DARTSASS=1.87.0 export ESBUILD=0.25.10 -export TYPST=0.13.0 +export TYPST=0.14.2 # NB: we can't put comments in the same line as export statements because it From 781cff75ac55241346d1bf975aad8379e1368f5e Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Sun, 14 Dec 2025 16:20:22 -0500 Subject: [PATCH 4/5] inset is raw typst inline --- src/resources/filters/quarto-post/typst-brand-yaml.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/filters/quarto-post/typst-brand-yaml.lua b/src/resources/filters/quarto-post/typst-brand-yaml.lua index 3ca5be17bb7..30587927c82 100644 --- a/src/resources/filters/quarto-post/typst-brand-yaml.lua +++ b/src/resources/filters/quarto-post/typst-brand-yaml.lua @@ -307,7 +307,7 @@ function render_typst_brand_yaml() inset = '0.75in' end logoOptions.width = _quarto.modules.typst.css.translate_length(logoOptions.width or '1.5in') - logoOptions.inset = inset + logoOptions.inset = pandoc.RawInline('typst', inset) logoOptions.location = logoOptions.location and location_to_typst_align(logoOptions.location) or 'left+top' quarto.log.debug('logo options', logoOptions) From 5b94e3c645940fa592a491f62fe4558803203bfc Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Wed, 17 Dec 2025 12:55:02 -0500 Subject: [PATCH 5/5] typst template: import highlighting-definitions for pandoc 3.8 next: investigate why this case enables syntax-highlighting --- src/resources/formats/typst/pandoc/quarto/definitions.typ | 5 +++++ src/resources/formats/typst/pandoc/typst.template | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/resources/formats/typst/pandoc/quarto/definitions.typ b/src/resources/formats/typst/pandoc/quarto/definitions.typ index fff6dcdc4c1..629a29998ad 100644 --- a/src/resources/formats/typst/pandoc/quarto/definitions.typ +++ b/src/resources/formats/typst/pandoc/quarto/definitions.typ @@ -171,3 +171,8 @@ ) } +$if(highlighting-definitions)$ +// syntax highlighting functions from skylighting: +$highlighting-definitions$ + +$endif$ diff --git a/src/resources/formats/typst/pandoc/typst.template b/src/resources/formats/typst/pandoc/typst.template index 79b2c33f583..da5f3fa632b 100644 --- a/src/resources/formats/typst/pandoc/typst.template +++ b/src/resources/formats/typst/pandoc/typst.template @@ -22,6 +22,11 @@ kind: image ): set figure.caption(position: $if(figure-caption-position)$$figure-caption-position$$else$bottom$endif$) +$if(highlighting-definitions)$ +// syntax highlighting functions from skylighting: +$highlighting-definitions$ + +$endif$ $if(template)$ #import "$template$": conf $else$