-
-
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
bussproofs not correctly computed [Unicode kerning problem?] #3240
Comments
I suspect it has to do with the kerning of the plain Unicode points is better seen. Whats the work around? Math Jax 3 input:
|
Your "kerning" issue is actually a different problem. It is a bug in the v3 SVG output when characters are used that aren't in the default MathJax TeX fonts. In this case, it is because upright Greek letters are not in the MathJax TeX fonts, and so that is triggering the bug. The bug is fixed in v4 (currently out in beta release). If you control the website that is displaying the results, you could switch to that. But if you are using a website like the one you link to for the example at the bottom of your original post, then your only choice to deal with the "kerning" problem is to switch to CHTML output using the MathJax contextual menu. The centering/scroll-bar problem you originally reported is a different problem, however. The bussproofs macros are not correctly computing the full width of the expression, and are leaving the width giving the incorrect bounding box in your image above. I do not currently have a work-around for that. We will have to look into it further. |
As @dpvc mentioned, the issue you are seeing is that we are working with a lot of negative spacing to compute the size of the inference bars and centering of conclusions. This has an effect on the bounding boxes that are generally assumed to be smaller than the actual element they contains. There are some improvements around bounding box computation in version 4. While they are not specific to bussproofs, they might still be helpful for you. Please give it a go. E.g., here is a difference between bounding boxes I can observe between MJ3 and MJ4 in the a11y explorer. Let me know if switching to MJ4 does make a difference for you. |
Would it be adviseable to split off the Unicode kerning problem, P.S.: I didn't have time yet to test CHTML and/or v4. |
Not at this point. That is already resolved in v4. Once that is released, we will look into back-porting some bug fixes like this, but there is not need to make a new issue at this point. |
The original issue of the bounding box for the proof being incorrect is resolved in the pull request linked above. |
Sounds good! Will do some testing soon... |
The fix has been merged into the |
Is the develop v4 branch different from the v3? In I only changed the end of the HTML document to this here:
The rest is the samel, in that Math.typeset() is called after
And output is not rendered: |
The The reason you are getting that in v4 but didn't in v3 is because v4 introduced new fonts that have much larger glyph coverage, and the font data is now broken into multiple smaller pieces to reduce the initial download and only loads some character data as it is needed. That means the output rendering can be asynchronous where it wasn't in v3. See the release notes for the alpha release for more details. You should be able to use the new bussproofs extension with v3 (though you will get a console warning about version mismatches). |
Issue Summary
I am using Math Jax 3 with bussproofs. The problem
is observable for example in the Chrome browser.
Boundaries of the SVG box are not correctly computed
leading to problems like:
Steps to Reproduce:
beginning of the HTML document:
end of the HTML document:
JavaScript call when the plain content has been rendered:
Create a small example:
Create a larger example:
The smaller example has an Ok bounding box:
The larger example has a not Ok bounding box:
Technical details:
See intro and steps.
Supporting information:
You can try it online:
https://www.xlog.ch/runtab/doclet/docs/06_demo/wilson/example42/package.html
The text was updated successfully, but these errors were encountered: