How to avoid indentation of theorem environments (using Theorion / theorem environments)?

I set first-line indent for paragraphs using

  set par(
    first-line-indent: 1em,
    spacing: 0.65em,
    justify: true,
  )

I’m using the Theorion package to typeset theorem environments:

#import "@preview/theorion:0.4.0": exercise, solution, show-theorion

Now I observed, that all the theorems, except for the first one in a section are indented:

===

#exercise()[

]

#exercise()[

]

#solution()[

]

#exercise()[
  
]

#solution()[

]

My question is what to do about this.

What’s your desired result?

If you want the first one also indented, set all to true. See Paragraph Function – Typst Documentation for explanation and examples.

Hi @Y.D.X and thanks for considering my question! No, the first line of a theorem environment should never be indented, that’s how it’s usually done in mathematical texts. Here is just the first example I found (very likely produced with LaTeX):

The default example and solution come from the cosmos.default submodule of the package, and they are simply put not theorem environments. They seem to be defined to work like inline text and that’s why they behave like that. They do not, for example, support numbering or references.

Apart from reading the code now, I don’t know much about the package. I see that for example the following functions will use “theorem environment” like configuration by default: theorem, lemma, proposition et.c.

Thanks, @bluss . However the problem also appears with e.g. theorem:

I see. It would be best to include code to reproduce. I think it’s best to ask the package author or someone familiar with the package.

I see now that the default theorem in the package wraps each theorem in a figure (hence I expected each theorem to behave like a block) but it also “unwraps” its own figures using the figure show rule fig => fig.body which contributes to this result. I think you’ll need another configuration - for example using another style from the same package. I can only recommend trying to find someone familiar with this package.

Thank you, @bluss . I opened an issue on github here and also added a code example there.