quarto-dev / quarto-dev/quarto-cli
Default `documentclass` produces PDFs with no tagged headings
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When a user sets pdf-standard: ua-2 on a format: pdf document,
Quarto correctly emits \DocumentMetadata{tagging=on, pdfstandard=ua-2, ...}
and veraPDF validates the result as PASSED against UA-2.
However, the PDF contains no tagged headings — \section and
\subsection collapse to plain <text> / <P> in the structure tree.
The default document classes scrartcl and scrbook are listed as incompatible on the LaTeX tagging project's
tagging status page.
Steps to reproduce
hello.qmd:
---
title: "Hello, Tagged World"
author: "Your Name"
lang: en-US
format:
pdf:
pdf-standard: ua-2
---
## Introduction
Body paragraph.
### A subsection
More body.
Render with quarto render hello.qmd, then look for "Introduction" in the structure tree
with the in-repo pdf-tag-tree.ts tool:
quarto run tools/pdf-tag-tree.ts hello.pdf "Introduction"
Actual behavior
With documentclass: scrartcl (Quarto's format: pdf default) —
veraPDF validates PASSED UA-2, but the structure tree has no headings:
Found "Introduction" on page 1
=== STRUCTURE TREE (Page 1) ===
<Root>
<Document>
<Part>
<P> (MCIDs: p21R_mc0)
<Table>
<TR>
<TD> (MCIDs: p21R_mc1)
<Part>
<P> (MCIDs: p21R_mc2) # <-- found
<Part>
<P> (MCIDs: p21R_mc3)
<Part>
<P> (MCIDs: p21R_mc4)
<Part>
<P> (MCIDs: p21R_mc5)
<Part>
<L>
<LI>
<Lbl> (MCIDs: p21R_mc6)
<LBody>
<Part>
<P> (MCIDs: p21R_mc7)
...
=== TEXT ITEMS CONTAINING "Introduction" ===
Text: "Introduction"
MCID: p21R_mc2
Tag path: Root > Document > Part > P
The heading "Introduction" is tagged as a plain <P> — no heading
tag, no <Sect> anywhere in the tree.
Expected behavior
## Introduction should tag as <H2> inside a <Sect> grouping
element; ### A subsection as <H3> inside a nested <Sect>.
E.g. with documentclass: article — same source, same veraPDF PASSED,
but real heading structure:
Found "Introduction" on page 1
=== STRUCTURE TREE (Page 1) ===
<Root>
<Document>
<Part>
<P>
<P> (MCIDs: p21R_mc0)
<P> (MCIDs: p21R_mc1)
<Sect>
<H2> (MCIDs: p21R_mc2) # <-- found
<Part>
<P> (MCIDs: p21R_mc3)
<Sect>
<H3> (MCIDs: p21R_mc4)
<Part>
<P> (MCIDs: p21R_mc5)
<Part>
<L>
<LI>
<Lbl> (MCIDs: p21R_mc6)
<LBody>
<Part>
<P> (MCIDs: p21R_mc7)
...
=== TEXT ITEMS CONTAINING "Introduction" ===
Text: "Introduction"
MCID: p21R_mc2
Tag path: Root > Document > Sect > H2
Your environment
No response
Quarto check output
$ quarto check
Quarto 1.9.36
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking tools....................OK
TinyTeX: v2026.04
VeraPDF: 1.28.2
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/.../TinyTeX/bin/universal-darwin
Version: 2026
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with hello.qmd using the default scrartcl class, then compare the structure tree from tools/pdf-tag-tree.ts with the article-class result. Trace how the PDF output handles section headings and verify that the rendered document contains H2 and H3 tags nested in Sect elements while still passing veraPDF UA-2 validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, typescript
- Domain
- documentation, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100