Hi,
Please somebody with better understanding of Typst internals enlighten me about this one.
I have a simple reference like this:
#set heading(numbering: "1")
= My heading <myheading>
See @myheading.
The output of typst query test.typ "<myheading>"
is surprising for me:
[
{
"func": "heading",
"level": 1,
"depth": 1,
"offset": 0,
"numbering": "1",
"supplement": {
"func": "text",
"text": "Section"
},
"outlined": true,
"bookmarked": "auto",
"hanging-indent": "auto",
"body": {
"func": "text",
"text": "My heading"
},
"label": "<myheading>"
}
]
I would expect supplement to be auto
, but it is pre-calculated. This makes scripting a bit harder because You have to check for language specific default values to see if the reference was called with supplement: auto
or something else.
Am I misunderstanding something here? Is there a good reason for this behavior?
Thanks,