Equation overlaps with equation numbering

Hi, everyone. I found that my long equation overlaps with the equation numbering. How could I address this problem? Thank you.

#set heading(numbering: "1.1")
#set par(justify: true)
#set page(numbering: "1 of 1")

#set math.equation(numbering: (..nums) => {
  let section = counter(heading).get().first()
  numbering("(1.1)", section, ..nums)
})

#show heading.where(level: 1): it => {
  counter(math.equation).update(0)
  it
}

#show ref: it => {
  let eq = math.equation
  let el = it.element
  if el != none and el.func() == eq {
    // Override equation references.
   "expression "
    numbering(
      el.numbering,
      ..counter(eq).at(el.location())
    )
  } else {
    // Other references as usual.
    it
  }
}


#import "@preview/glossarium:0.5.1": make-glossary, register-glossary, print-glossary, gls, glspl
#show: make-glossary

$
PP[(s_a,r_a),(s_b,r_b)] &= frac(PP_("incr")(L_a,L_b)^N, PP_("incr")(L_a,L_b)^N + PP_("incr")(L_b,L_a)^N) \
&= frac([1/4 B(u_S (s_a),u_S (s_b)) + 1/4 B(u_R (r_a),u_R (r_b))]^N,[1/4 B(u_S (s_a),u_S (s_b)) + 1/4 B(u_R (r_a),u_R (r_b))]^N + [1/4 B(u_S (s_b),u_S (s_a)) + 1/4 B(u_R (r_a),u_R (r_b))]^N) \
&= cases(
  1"," s_a >= s_b "and" r_a >= r_b "and at least one of them strictly holds" \
  0.5"," (s_a = s_b "and" r_a = r_b) "or" (s_a > s_b "and" r_a < r_b) "or" (s_a < s_b "and" r_a > r_b) \
  0"," "otherwise (that is," s_a <= s_b "and" r_a <= r_b "and at least one of them strictly holds)"
)
$ <ChoiceProb>

You see, the numbering (0.1) overlaps with the long formula:

There is the equation.number-align property that you can set. Does that work for you, or do you seek a more customisable solution?

Yeah it does, thank you!

No problem. If that solved it, please mark the comment as the solution using the checkmark icon. It makes it easier for future readers to filter & find :slight_smile:

1 Like