Closed
Description
Summary:
Using a hyphenated cross-reference label like #thm-reference
results in extra text preceding the callout when rendered.
Description:
custom-numbered-blocks
behaves as expected when cross-reference labels are formatted as a single word, such as #thmRef
. But when labels are formatted with hyphens like #thm-ref
, as suggested in the Quarto cross-reference documentation, the resulting rendered output precedes the numbered block with a previous numbered block's label.
Steps to reproduce:
- Open a new Quarto book project.
- Install
custom-numbered-blocks
extension. - Configure extension in
_quarto.yml
as follows:
project:
type: book
book:
title: "Bug Report"
chapters:
- index.qmd
format:
html:
theme: cosmo
pdf:
documentclass: scrreprt
filters:
- custom-numbered-blocks
custom-numbered-blocks:
groups:
thmlike:
colors: [948bde, 584eab]
boxstyle: foldbox.simple
collapse: false
classes:
Theorem:
group: thmlike
- Edit
index.qmd
as follows:
# Index
::: {.Theorem #thmRef}
This theorem has citation key `#thmRef`. It exhibits expected numbering behavior.
:::
Filler text
::: {.Theorem #thm-Ref}
This theorem has citation key `#thm-Ref`. It results in the block being preceded by the text **Theorem 1.1.**
:::
More filler text
::: {.Theorem #thm-Ref2}
This theorem has citation key `#thm-Ref2`. It results in the block being preceded by the text **Theorem 1.2.**
:::
Actual result:
Numbered blocks with hyphenated labels are preceded by unexpected text.
Expected result:
Numbered blocks with hyphenated labels behave identically to blocks with non-hyphenated labels.
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.450
Path: C:\Users\<User>\AppData\Local\Programs\Quarto\bin
CodePage: 949