-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mfrac linethickness causes render issues #2381
Comments
I'm moving this to the main MathJax issue tracker, so that it is listed with all the other issues. |
The display for Note that It is not clear what result you are looking for. If It is possible to use a MathML pre-filter to convert unitless line thickness to multiples of .06em (the size of |
I've made a pull request to fix the unitless |
Thank you for your quick response! You are right, I thought linethickness="1" is supposed to produce the normal line thickness, without having to replace "1" with "medium". What I need this for: I am using mathjax-full "^3.0.0". I assume that after your PR is merged, linethickness="1" will produce normal line thickness, right? |
It is, but that usage is discouraged by the MathML specification: "A number without a unit is interpreted as a multiple of the reference value. This form is primarily for backward compatibility and should be avoided, prefering explicit units for clarity."
After it is merged, it will be in the In the meantime you could use something like mml = mml.replace(/ linethickness\s*=\s*"([1-9][0-9]*(?:\.[0-9]*)?)"/g,
function (match, n) {return ` linethickness="${parseFloat(n)*.06}"`}) in order to work around the problem for now. |
Awesome. Thanks a lot for helping! 👍 |
Make unitless linethickness be a multiple of the default size. (mathjax/MathJax#2381)
When linethickness is set, the fractions don't render properly, the line height is wrong (
<math><mrow><mo>-</mo><mfrac linethickness="1"><mn>1</mn><mn>3</mn></mfrac></mrow></math>
).I tried to render in multiple ways:
And this how it renders:
The ones that have linethickness="1" set don't render properly.
(I observed that
em
is used to render that line.)Is there any fix for this?
Thank you!
The text was updated successfully, but these errors were encountered: