Open Enter-tainer opened 3 months ago
This also happens when there is no char in \text
This can be extremely hard to fix. https://discord.com/channels/1054443721975922748/1225462045583872083
In short, when layouting texts in math, typst has special code path for:
The tricky part is that this happens in layout stage, where everything is flattened. It's impossible to tell which Text
comes from content block and whch text comes from math.
Maybe we can switch to strings for simple \text
and textmath
for complex ones? cc @OrangeX4 Although I don't know if strings can fix this problem
I think this can work, which means we need to first check if there are any special characters like the dollar sign $
inside \text{}
, and then choose to convert them as string or content.
renders to![image](https://github.com/mitex-rs/mitex/assets/25521218/1ed30f70-9beb-438d-95e9-3d50c3bd57f4)
In mathjax it is![image](https://github.com/mitex-rs/mitex/assets/25521218/5fdbc087-83a5-4c5a-b033-4cd9f335807d)