#show heading.where(level: 4): it => block(strong(it.body) + [ ])
works somewhat well. However, I use
#set par(first-line-indent: 1.8em)
to indent the first line of a paragraph. Using the above solution, the inline heading is also indented, which I do not want. Instead, I want by formatting to be this:
INLINE HEADING some text for this a heading. And
some more text.
A new paragraph under this heading. Observe that it
is indented, in contrast the the heading!
Unfortunately Typst’s paragraph handling isn’t very consistent so you can’t do this automatically. The easiest way I see would be to define a command that adds the appropriate spacing and call it before every incorrectly indented heading:
#let indent = h(1.8em)
This is a list:
- arst
- arst
#indent
==== This is indented correctly
$
1 = 0
$
#indent
==== This is fixed as well