-
Notifications
You must be signed in to change notification settings - Fork 19
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
Deprecate/Remove mathvariant attributes #77
Comments
First results from #55 suggest that mathvariant is still widely used, so I'm don't think we can remove it and browsers should still support it. |
Most usage statistics are collections generated from converting TeX to MathML. I think, modifying the converters to output mathml4 instead of mathml3 has to be done anyhow... Thus I think, we should better ask ourselves how much effort would the change in the converter be, rather than how much is a particular element used. |
I agree it is worthwhile to know how much effort it is to update the converter. However In the case of mathvariant, we have a converter like itex2MML (and its JS clone TeXZilla) which has been there for 20 years. It is a LALR parser generated by bison/flex tools, which makes it extremely fast (compared to other LaTeX to MathML converters) but since it generates the output stream bottom-up you cannot apply the mathvariant transform at the time you output the character. Maybe that can be fixed with some complete refactoring to generate a JSON structure instead of a string (fred-wang/TeXZilla#10) probably at the price of a performance loss. In any case, that does not solve the case of existing content. For the browser implementation: |
A side effect of text-transform is that when copy and paste as plain text, the content should be the original one and not the transformed according to the CSS specification (w3c/csswg-drafts#627 (comment)). If this is okay, it seems reasonable to use, from my point of view, the text-transform. |
@dani31415 wellllllllll.... there is a lot here that is written down and a lot that works differently from what is written down and a lot that is being debated for various reasons, so I don't think that this is necessarily a given. See also for example w3c/csswg-drafts#3775, for one of the many open issues here. |
Additional note: we still need mathvariant="normal" to cancel the automatic math italic behavior on single-char mi, so we won't be able to completely get rid of the mathvariant attribute anyway. |
Current proposal:
|
Resolution:
Specification:
Implementation:
Polyfill:
Tests:
|
I'm opening this for the record as that was discussed in previous meetings.
Basically, some people think this attribute is not very useful as one can just use the equivalent transformed unicode characters. It was designed a long time ago to work around issues with non-BMP characters.
Others mentioned that modern LaTeX engines just perform the character transform and only allow to use commands like \mathfrak for text (i.e. \mathfrak{a} but not \mathfrak{\frac{a}{b}}). (note: my version of XeLaTeX still seem to support \mathfrak{\frac{a}{b}}) so we could somewhat restrict mathvariant to token elements.
I suspect mathvariant is still quite popular in tools / existing content. Trying \mathfrak{\frac{a}{b}}) on LaTeXML, Mathoid/Wikipedia and TeXZilla, the first uses transformed characters, the second mathvariant on mi elements, the third mathvariant on mstyle element.
The consensus was to try to make it part of CSS's text-transform:
https://lists.w3.org/Archives/Public/public-mathml4/2019Mar/0007.html
See also #31 #1
The text was updated successfully, but these errors were encountered: