-
Notifications
You must be signed in to change notification settings - Fork 412
Open
Labels
Description
Bug description
When using @sec- cross-references from within an unnumbered chapter ({.unnumbered}) to a numbered chapter, the reference renders as 1 My Chapter instead of Chapter 1. The same reference renders correctly as Chapter 1 when placed in a numbered chapter.
Additionally, the bracket syntax documented at Book Crossrefs does not work in this context:
[-@sec-chapter1]should produce just1but still produces1 My Chapter[Chapter -@sec-chapter1]should produceChapter 1but still produces1 My Chapter
Minimal reproducible example
_quarto.yml:
project:
type: book
book:
title: "Test Book"
chapters:
- index.qmd
- intro.qmd
- chapter1.qmd
format:
html:
theme: cosmoindex.qmd:
# Preface {.unnumbered}
Some preface text.intro.qmd:
# Introduction {.unnumbered}
See @sec-chapter1 for details.chapter1.qmd:
# My Chapter {#sec-chapter1}
Chapter content.Expected behavior
@sec-chapter1 in intro.qmd should render as Chapter 1, consistent with its behavior when placed in a numbered chapter.
Bracket syntax ([-@sec-chapter1], [Chapter -@sec-chapter1]) should also work as documented.
Actual behavior
@sec-chapter1 renders as 1 My Chapter regardless of syntax used.
Quarto version
1.8.27
Related discussions
- Linking to numbered chapters from within an unnumbered chapters #9771 (same issue, acknowledged by maintainer, no tracking issue created)
- Cross-references on unnumbered pages fail (PDF) or are mislabeled (HTML) #5946 (related unnumbered chapter cross-reference issues)
Reactions are currently unavailable