Skip to content

Default documentclass produces PDFs with no tagged headings #14422

@cwickham

Description

@cwickham

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitybugSomething isn't workinglatexLaTeX engines related libraries and technologies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions