You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the alpha.1's SVG's height and vertical-align values are replaced in the beta.4 SVG, the beta.4 SVG looks identical to alpha.1's SVG. So, I wasn't sure if this was an expected change.
One of our use cases for tex2svgPromise() is to add the resulting SVG to a canvas, wherein the canvas shows an animation with other images, text, and so on. Not exactly pixel perfect, but pretty close.
The text was updated successfully, but these errors were encountered:
The height and depth of the equal sign was incorrectly set in the alpha.1 font data. Glyphs that are used as parts of multi-character assemblies for horizontal characters have their height and depth set to the largest height and depth of any of the characters in the assembly, so that they will align properly. Because the equal sign is used for the stretchy \Longrightarrow (and other double arrows), it was getting the extra height and depth of the arrow heads. That has been fixed in beta.4.
That makes the height and depth of the expression smaller in beta.4 than in alpha.1. But note that the viewBox is also different between the two, with beta.4 being smaller than alpha.1. For me, when I view your two example codepens in Firefox, the output is identical (the smaller viewBox and the smaller height and depth compensate for each other, and the visual output is the same.
Issue Summary
The resulting SVG from tex2svgPromise() has a slightly different height and vertical-align style for mathjax-tex between alpha.1 and beta.4
Steps to Reproduce:
Observed: SVG has
height="2.26ex"
andvertical-align: -0.563ex;
Observed: SVG has
height="2.034ex"
andvertical-align: -0.464ex;
Technical details:
I am using the following MathJax configuration:
and loading MathJax via
Supporting information:
The text was updated successfully, but these errors were encountered: