To be honest I wouldn't recommend it just yet. Right now Typst doesn't expose that many layout primitives for math -- stuff like fractions are special-cased in the compiler. It all should be theoretically possible -- technically everything you need is there -- but from looking over the documentation and experimenting with this my guess would be that it would feel more like implementing your own layout engine with Typst's programming language than gluing existing stuff together.