Typst writer: propagate `lang` attribute on Span elements
bug
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`:
```markdown
Hello [bonjour, monde]{lang=fr} world.
```
Run:
```
pandoc -f markdown -t typst test.md
```
## Actual
```typst
Hello bonjour, monde world.
```
## Expected
```typst
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
```
```html
<p>Hello <span lang="fr">bonjour, monde</span> world.</p>
```
### LaTeX
```
pandoc -f markdown -t latex test.md
```
```latex
Hello \foreignlanguage{french}{bonjour, monde} world.
```
**Pandoc version**: pandoc 3.9.0.2 on macOS 26.5
关闭于 2026-06-06 3 条评论