Task
I'm using quarto
to write an online book and need to mimic the environments and counters of a published book. The latter employs five custom framed environments (examples, exercises, remarks, theorems, definitions) with a joined counter (within the chapter).
I'm considering to use the readily available callout blocks for these because these are styled quite nicely by default. I haven't been successful, though, to create a custom counter for these callout blocks so that I can cross-reference from the text. Is there a way to do so?
(Remark: I've also tried to do this via standard amsthm environments provided through quarto
, see Shared counter in quarto for exercises, examples, etc.)
Demo
I would have hoped that something like the following existed so that I can create a new #callout
counter. But I couldn't find infrastructure for this:
The first definition is @callout-1.
:::{.callout-note}
## Definition {#callout-1}
This should be Definition 1.1.
:::
It is followed by the first example, @callout-2
:::{.callout-tip}
## Example {#callout-2}
This should be Example 1.2.
:::
Because this doesn't work like this quarto
renders this to:
But what I'm looking for is a result like this: