math equations can be wider than Wax width
From this Kotahi issue: kotahi/kotahi#1397 (closed)
We have an issue where someone has a malformed LaTeX in a <math-display
element:
There's a pretty clear import issue going on (those delta
s should probably be \delta
which would make the Greek letter, which would make the width of this much less. But if you go to the Wax demo and try typing in a long equation:
You can see that this is a Wax issue:
Adding a bit of CSS fixes this:
math-display {
max-width: 100%;
overflow-x: auto;
}
(We can add that in Kotahi, but it seems like that should be added into MathService/math.css
.)
I think this is effectively a problem with MathJax: it doesn't seem like it sets a max-width for equations: https://groups.google.com/g/mathjax-users/c/Ou0csmewIr8 – in https://gitlab.coko.foundation/wax/wax-prosemirror/-/blob/master/wax-prosemirror-services/src/MathService/plugins/math-nodeview.js#L198 there's a containerWidth
of 700 being set for MathJax, but it's not respecting that.