Skip to content

unexpected behavior in callouts using #xxx- label as header #2241

@HelenaLC

Description

@HelenaLC

In order to have numbered callouts (e.g., for cross-referenceable exercises and solutions), I have attempted to

  • set callout captions to be empty via the _quarto.yml file
  • use "#exr-" (or similar) as headers in the callouts

with the somewhat unexpected result that

  • printed names (here, "Exercise") are rendered twice
  • the corresponding counted is incremented twice

I am not sure whether this is a bug per se, but any suggestions how to achieve/fix this would be greatly appreciated!

_quarto.yml:

format: html
language:
  callout-note-caption: ""

.qmd:

::: {.callout-note #exr-one}

text

:::
See @exr-one.

output:

image

  • This works, but isn't ideal:
::: {.callout-note}
::: {#exr-two}

text

:::
:::

See @exr-two.

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions