typst
typst copied to clipboard
Align equation number vertically to the formula baseline - `number-align` in `math.equation`
Description
When a single-line math formula is presented, I would like to have the equation number aligned with the correct baseline. Now, if you include for example a sum, the height of the block is adjusted and the equation number is aligned with respect to the total height. This is not the case in LaTex, for example. Compare the first (LaTex) and second (Typst) snippets along with a rendered images.
\begin{equation}
c_{t+1}(v) = c_{t}(v) - deg(v) \cdot \mathbb{1}(c_{t}(v) - deg(v)) + \sum_{u \in N(v)} \mathbb{1}(c_{t}(u) - deg(u)) \quad \forall v \in V
\end{equation}
#set math.equation(numbering: "(1)", number-align: end + horizon)
$ c_(t+1)(v) = c_(t)(v) - deg(v) dot.c bb(1)(c_(t)(v) - deg(v)) + sum_(u in.small N(v)) bb(1)(c_(t)(u) - deg(u)) wide forall v in V $
Use Case
Hi - I wrote the number-align
feature. I think this issue of undesired output should better be categorized as a bug and let me fix it.