I would like to do the opposite of cases. Instead of this:

(which is given by $ f(x) = cases(g(x), h(x)) $)
I want this:

I was able to accomplish my goal by creating the following function:
#let sesac(..arr, spacing: 6pt) = {
box($ lr(#stack(dir: ttb, spacing: spacing, ..arr.pos().map(item => align(left, $ #item $))) }) $, )
}
and using it like so:
$ sesac(g(x), h(x)) = f(x) $)
to get

I called it "sesac", since that's "cases" spelled backwards.
In the case where you need to align the equations on the left (or right) side, I also made sesac2:
#let sesac2(l, r) = $ lr(#box(l) }) #box(r) $
Used as follows:
#sesac2($ g(x) \
h(x) $, $ f(x) $)
(It produces very similar output)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With