The Typst writer ignores the lang attribute on bracketed Span elements.
This means PDFs produced via the Typst writer can't meet WCAG 2.2 Success Criterion 3.1.2 (Language of Parts) for inline language changes.
The HTML and LaTeX writers handle the same input appropriately.
Related. #10965 added support for lang on Divs in the Typst writer; this issue covers the analogous Span case.
Example
Given test.md:
Hello [bonjour, monde]{lang=fr} world.
Run:
pandoc -f markdown -t typst test.md
Actual
Hello bonjour, monde world.
Expected
Hello #text(lang: "fr")[bonjour, monde] world.
Typst itself propagates #text(lang: "...") into the PDF's tagged structure as /Lang marked-content attributes (verified with Typst 0.14.2), so the downstream toolchain is ready to receive the right output.
Other formats
For comparison
HTML
pandoc -f markdown -t html test.md
<p>Hello <span lang="fr">bonjour, monde</span> world.</p>
LaTeX
pandoc -f markdown -t latex test.md
Hello \foreignlanguage{french}{bonjour, monde} world.
Pandoc version: pandoc 3.9.0.2 on macOS 26.5
The Typst writer ignores the
langattribute on bracketed Span elements.This means PDFs produced via the Typst writer can't meet WCAG 2.2 Success Criterion 3.1.2 (Language of Parts) for inline language changes.
The HTML and LaTeX writers handle the same input appropriately.
Related. #10965 added support for
langon Divs in the Typst writer; this issue covers the analogous Span case.Example
Given
test.md:Run:
Actual
Expected
Typst itself propagates
#text(lang: "...")into the PDF's tagged structure as/Langmarked-content attributes (verified with Typst 0.14.2), so the downstream toolchain is ready to receive the right output.Other formats
For comparison
HTML
LaTeX
Hello \foreignlanguage{french}{bonjour, monde} world.Pandoc version: pandoc 3.9.0.2 on macOS 26.5