Earlier, I raised what I thought was a bug on GitHub, which I then got told was intentional behavior.
The question is regarding show rules targeting headings.
Consider the following snippet
#set page(height: auto, width: auto, margin: 1cm)
#show heading: block // this line does not affect anything ?!
= hello
// big space between these headings
= hello
// smaller space here
#block(heading[hello])
// big space again
= hello
// also big space
= hello
// small space again
#block(heading[hello])
// and big spacing for consecutive block-wrapped headings
#block(heading[hello])
Which produces the following output:
As to my understanding, the show element: function
syntax (show heading: block
in this case), is esentially a wrapper for function(element(content))
(i.e. block(heading(content))
).
Another example is the code
#show "Project": smallcaps
taken directly from the docs. Naturally, this would be a wrap any Project
to #smallcaps[Project]
.
I am not quite sure I understand the answer provided on GitHub, as I read it, it would assume the order heading(block(content))
, or some hidden semantic rule?
Can someone explain to me why there is a difference between wrapping a heading manually and via a show rule – where do the semantics change?