How do I align text in ctheorems' thmbox?

I’m using the package ctheorems package to insert theorems, definitions, etc. in my document. For examples, I defined

#let example = thmbox("example", "Example", fill: rgb("#eeffee"))

Now when I write an example:

#example[
  Example text ...
]

the text is centered. How can I left-align or justify-align instead?

Did you include #show: thmrules at the top of the document? The package requires it to function correctly.

Hello @matcha25, I have renamed your post “How do I align text in cthorems’ thmbox?”. You can take a look at How to post in the Questions category, we recommend that

1 Like

Ok that works, thanks !

I need to have @show: thmrules in every .typ document ? Not just on the main one (that includes the other ones)?

Hello @matcha25, not necessarily. That depends on the structure of your document. Usually, you would have a main document with all your styling, and include other sub-files.
See Best practices for working with longer documents and its first link.

Yes, that’s the structure I’m using now. However, if I only have:

@show: thmrules

in the main document, I still see theorems center-aligned in the included sub-files. The only way to fix it seems to be to include @show: thmrules in all the sub-files.

That probably shouldn’t happen. Can you share the loose structure of your document?