How to change margins around ctheorems Proof environment?

I am sure there is something in the manual for this, but for the life of me, I cannot dissect it. For the ctheorems package, I am trying to change the behavior of the proof environment since I do not like the defaults, mainly because it doesn’t match the default behavior of the theorem environment in LaTeX.

As an example, if one compiles:

#set document(
  date: auto,
)

#set page(
    paper: "us-letter",
    margin:(
      top: 2cm,
      bottom: 2cm,
      left: 1.5cm,
      right: 1.5cm
    ),
    numbering: "1",
    number-align: center + bottom
)

#set text(
  font: "New Computer Modern",
  size: 10pt
)

#set par(
  justify: true,
  leading: 0.55em,
  spacing: 0.55em,
  first-line-indent: 1.8em
)

#show heading: set block(
  above: 1.4em,
  below: 1em
)

#set math.equation(numbering: "(1)", supplement: [Eq.])

#set cite(style: "alphanumeric")

#import "@preview/ctheorems:1.1.3": *
#show: thmrules.with(qed-symbol: $square$)

#let theorem = thmbox("theorem", "Theorem")
#let corollary = thmplain(
  "corollary",
  "Corollary",
  base: "theorem",
  titlefmt: strong
)
#let definition = thmbox("definition", "Definition", inset: (x: 1.2em, top: 1em))

#let example = thmplain("example", "Example").with(numbering: none)
#let proof = thmproof("proof", "Proof")

#let dd = math.upright("d")

We wish to prove Euler's Gamma function is a generalization of the factorial function.

#proof[
  We first recall the definition of Euler's $Gamma$-function:
  #math.equation(block: true, numbering: none, $ Gamma(z) = integral_(0)^(infinity) s^(z - 1) e^(-t) dd t $)
  With this integral, we can ...
]
From this point, ...

one sees that the proof doesn’t get vertically spaced and the margins of the proof don’t match the external margins.

I won’t ask about the logic of the ctheorems defaults, but I want to ask, what settings do I need to change to get the proof margins to match the document margins, and to get vertical padding around the proof?

Hi @Paul744,
I have no idea how the LaTeX default behavior looks like, but I think you are looking for inset which you already used for thmbox.

#let proof = thmproof("proof", "Proof", inset: (x: 0pt, y: 1em))

@flokl That was it. Thank you.

Hey @Paul744, welcome to the forum! I’ve changed your question post’s title to better fit our guidelines: How to post in the Questions category

For future posts, make sure your title is a question you’d ask to a friend about Typst. :wink:

In addition, I’ve marked @flokl’s post as a solution. If it didn’t solve your problem, please let us know if you have further questions!