Closed Repo-SK closed 1 month ago
From the screenshot, it would appear you do not have the required CSS stylesheet loaded to display formulas correctly.
To correctly display this markup, import the stylesheet with import "mathlive/static.css". The stylesheet can be found in dist/mathlive-static.css.
Yep that was it, thanks.
Description
Superscripts are being rendered as subscripts in the generated HTML when using
convertLatexToMarkup
. The math-field component renders it as expected, it's just the static rendering withconvertLatexToMarkup
that's not behaving as expected.I tried different fonts, including the bundled katex font but the behavior is the same. It looks like a bug in the css code as I can see some spans are correctly positioned but the final superscript element isn't respecting the parent(s). I'll look into it in more detail tomorrow morning.
Steps to Reproduce
Actual Behavior
"2" is rendered as a subscript of "x".
Expected Behavior
It should be rendered as x^2 with the "2" anchored to the top-right of "x".
Environment
0.101.0
Operating System macOS
Browser Chrome, Firefox, Safari