-
Notifications
You must be signed in to change notification settings - Fork 14
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
\Big/ and \Big\backslash etc are too small #261
Comments
@physikerwelt could you also attach the MathML snippets for the examples you're showcasing? I followed the link (2 levels in) and it's still hard to extract that. It is very helpful to know the exact markup that encounters that rendering. I personally enjoy codepen.io to automate that when possible, but even a short snippet in the issue description helps. |
Sorry, I missed to add that we deal with constructs like |
A good way to double-check one has STIX Two active over the example is to add in the CSS codepen tab: @import url('https://fonts.cdnfonts.com/css/stix-two-math');
math {
font-family: "stix two math";
} I can reproduce both variants have the arrows stretching with STIX loaded, as with David's screenshots. For the vertical bars at the end, interestingly they start stretching if you add an explicit |
I hope that by a clever choice of the "correct" UTF8 symbols, things will look good in most browsers, similar to the treatment of \overarc earlier this year. |
This is also the way it looks at the Wikipedia help page. |
I think with a math font enabled almost all examples above react as expected. I distilled a smaller set of 4 tests for those, for more targeted discussion, all of which appear specific to On closer inspection I understand the cause - it is the Operator Dictionary, which lists "vertical line" as stretchy in the "prefix" and "postfix" form, but has no entry for "infix", which would be the form in these examples. Still, we have two available techniques to forcing stretch on vertical line today -- adding an explicit I know people aren't too fond of updating the operator dictionary, and since there is a workaround - is there anything else remaining? |
Ok, I'll add stretchy to everything that comes out of \big and friends, and it will be fine. <mo maxsize="1.623em" minsize="1.623em" stretchy="true">|</mo> PS: For the test / \big/ \Big/ \bigg/ \Bigg/ \dots \Bigg\backslash \bigg\backslash \Big\backslash \big\backslash \backslash the result looks to me as if \Big/ > \bigg/ however minsize=maxsize=1.6em for Big and minsize=maxsize=2.1 for bigg. |
I updated the codepen (adding stretchy="true" symmetric="true") and added the latest code. The problem | seems to be fixed, but \ still renders incorrect. (This might be a browser bug rather than an issue to be discussed here, but I don't know.) |
Add stretchy=true to more constructs after consolidating the W3C MathWG w3c/mathml-core#261 Bug: T375960 Change-Id: Ie472d5a3be2dda8b4c50b0c5d091d735577e11d9
* Update Math from branch 'master' to c53b1917567d3039eea28f79b1f482ec2955d22e - Merge "Improve parsing of \big et al." - Improve parsing of \big et al. Add stretchy=true to more constructs after consolidating the W3C MathWG w3c/mathml-core#261 Bug: T375960 Change-Id: Ie472d5a3be2dda8b4c50b0c5d091d735577e11d9
The new rendering https://en.wikipedia.beta.wmflabs.org/wiki/T375960 looks better in Chrome now, but is still broken in FF. Are you aware of a ticket for the problem in FF? |
Maybe there is char that works in both Chrome and Firefox? |
@dginev's observation that stretchy default is only specified for the delimiter case not infix is good and is somehow related to historical development here in that classic tex only had The question of whether it's possible to change the operator dictionary defaults at all has just been raised in #260 Related to that, MathML can not specify any character stretches, it can only specify that it may stretch if implemented by the font. Guidance on which characters a math font should specify as stretchy (which basically means the opentype tables within the font have to specify the glyphs for the component parts and how they are combned in vertical or horizontal direction) comes from Unicode report TR25 and in particular its associated data file MathClass-15 https://unicode.org/Public/math/revision-15/MathClassEx-15.html which currently says
So, again in line with @dginev's comment above anything that is marked as an open or close delimiter or fence (which can be used as either open or close) should be expected to be stretchy, but binary operators are considered individually. MathClass-15 specifys three stretchy B operators U+002F U+005C U+2044 It then specifies a further 60 characters that are categorised as C, O or F
If we want any changes to any of these classifications we should raise with the Unicode group maintaining UTR 25 for consideration in any future MathClass-16. (There is some overlap of members between the relevant groups here) |
Ok. If I got this right, there is a bug in firefox that prevents |
As feedback to the MathML rendering in Wikipedia, it was realized that some large operators do not stretch the way they'd in LaTeX.
Current rendering:![](https://camo.githubusercontent.com/aabad65df59429d146e994c0ebbc9ee07e146cd8e1e3127abc551bf58d6ce670/68747470733a2f2f706861622e776d6675736572636f6e74656e742e6f72672f66696c652f646174612f63613779706b76727578376e6b6d3678356d6b6a2f504849442d46494c452d6b6b6737627a6772643468346978696b75646d712f707265766965772d696d6167652e706e67)
Expected rendering:![](https://camo.githubusercontent.com/fa81e996156dc307ad0a29af87e521a154b307d7451197ec3ee168e613fb67cb/68747470733a2f2f706861622e776d6675736572636f6e74656e742e6f72672f66696c652f646174612f666871773235686571347262376668787069347a2f504849442d46494c452d796b766135686a6b76623266376f326b6f6564352f707265766965772d696d6167652e706e67)
As this problem exists in several browsers, it might be that the spec is too vague how to stretch operators.
The text was updated successfully, but these errors were encountered: