How to remove a first-line indent of a paragraph after the centered text

The problem here is that you are inserting the pseudoheading’s paragraph verbatim, so Typst thinks it’s just yet another paragraph in the flow, meaning the next paragraph isn’t considered the “first” in a paragraph run (and only the first isn’t indented). Wrap it around a block to force a break in the flow, such that the next paragraph will no longer be indented:

#set par(first-line-indent: 1em, justify: true, leading: 1em)
#show par: set block(spacing: 1em)

#let pseudoheading(body) = {
  set align(center)
  set par(justify: false)
  block(smallcaps(body))  // <---- block()
}

// --

= This is a regular heading

#lorem(20)

#lorem(20)

#heading(outlined: false)[This is another regular heading, though not outlined]

#lorem(20)

#lorem(20)

#pseudoheading[
  And this is a pseudoheading
]

#lorem(20)

#lorem(20)

2 Likes