-
Notifications
You must be signed in to change notification settings - Fork 56
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
Review MathML #313
Comments
Note that @fred-wang's MathML implementation note describes some more details about how MathML can be rendered and integrated into HTML. |
During TPAC discussions, it appeared that not everybody in the TAG group was aware of recent MathML activities. Here is a quick summary:
We plan to announce and launch the MathML in Chromium project and to give further details very soon, after internal discussions. [1] http://www.mathml-association.org/MathMLinHTML5/ |
All STEM publishers (myself included) are greatly interested in this. We use MathML heavily and might be able to provide some resources. |
Summary of our plan: (1) We know that the MathML specification has design issues and is currently no longer maintained by the Math WG. Instead of just throwing it away and restarting something from scratch, we want a smooth transition to make it more aligned with the rest of the Web platform. The implementation note that we used for WebKit was one step in that direction and we are willing to do more. Basically, our idea is to extract a core subset (with some hints on how to keep backward compatibility for existing documents) and rely as much as possible on HTML5/CSS features (refining the implementation note while new features are introduced). Finally, TeX/OpenType algorithms/features and WPT tests are essential to provide accurate and consistent rendering across browsers. This is harder if one lets Web developers implement and maintain their own math rendering. (2) Google is pushing for Houdini and layered APIs but things are far from being ready. In particular, they think they will only ship basic LayoutNG support in a few months and things like a font API (instrumental for math layout) are still in the planning stage. However, we agree with Google's layout team that this new layout approach is a good path forward. The plan is to start with a C++/LayoutNG-based implementation of MathML in order to see how much we are able to do while introducing new APIs as needed. In particular, an abstraction layer for HarfBuzz's OpenType MATH API would be helpful for the Houdini fonts API and to ensure it is good enough to fulfill the needs of math rendering. In the future, we could move to higher level implementations, always being careful that the WPT tests do not break and that we don't have significant performance regressions compared to the pure C++ implementations. (3) Apple and Mozilla's plans for Houdini and Layered APIs are not clear at the moment. However, WebKit and Gecko already have MathML implementations. Our short-term plan is to refine/cleanup these implementations based on the standard evolution we are going to make in (1) and in the future we could rely on the outcome of (2) to further improve the implementations. |
You linked to https://www.w3.org/Math/draft-spec/ but the currently maintained editors draft is At that time some integration with http://www.mathml-association.org/MathMLinHTML5/ would probably make sense. |
In my opinion it is time to think about deprecating MathML as a web standard. In
Having said that, I still think that there is a place for MathML as a |
Thanks for the ping @torgo. I admit it's not clear (to me) what kind of input TAG is looking for, so I apologize if what follows isn't too useful. I'll second @zorkow since I'm already on record calling for the deprecation of MathML from HTML5. However, this is a complicated discussion to have and I'm hesitant to have it on an issue thread. My suggestion would be for TAG to engage with web developers who build the tools that are currently used for equation layout on the web (i.e., not using MathML but using CSS, SVG etc) to find out why they do not consider MathML an option (including the existing implementations). The MathOnWeb CG has a good representation of that group as well as supporters of MathML and our bi-weekly conference calls are open to everyone (disclaimer: I'm co-chair). Personally, I think instead of a large monolithic spec like MathML, expressing layout in a way reminiscent of early HTML, the web would benefit from incrementally adding low level features to succcessful standards (e.g., CSS, SVG, ARIA) to help the web community at large. Reversely, MathML has been very succesful in the XML world outside of the web and it would be better if MathML could develop outside of HTML5 so as to serve the community that has found it useful. At the risk of oversimplifying, I believe MathML adds no value to the web platform. Almost all necessary layout features of Presentation MathML are available in CSS and SVG. Those layout features that require hacks (in CSS or SVG) are becoming fewer and fewer (down to 3-5 issues depending on who you ask). Most of those are generally useful (e.g., better access to font features, easier baseline alignment, stretchy brackets) so it seems natural that those features should be realized as part of the relevant standards in a way that helps move the web forward as a whole. The few layout features that are hard to reconcile with existing standards are, in my experience, not about MathML (which barely specifies layout to begin with) but are due to preferences stemming from print layout (e.g., the specifics of TeX layout). I'm not sure if realizing such details is a reasonable architectural goal for the web but either way it seems to be an independent problem. The often ignored Content MathML presents a bit of a different problem. Besides there not being a lot of ContentMathML in the wild, it is very difficult to align visual layout with the way semantics are expressed in Content MathML (in part due to the highly formalized style of semantics). Content MathML also adds no value in terms of accessibility and there is a lack of tools that can leverage its semantics (e.g., search). Presentation MathML does not encode semantics in the usual sense (though it may appear to do so) and the few assistive technologies that try to support it heavily rely on heuristics to try to make sense of the markup. I think would be better to require heuristics at authoring time (to enhance legacy content) alongside general improvements to ARIA, AOM etc. to make it easier to expose additional information and simplify exploration of complex content fragments, both of which would benefit the larger community (e.g., diagrammatic content in STEM fields). Overall, closing gaps in existing standards seems a much smaller task with a clearer benefit to the web as a whole than trying to salvage MathML. |
I'd personally like to see MathML remain a standard. Like any other web standard, there are ways in which it would be useful to improve it to make it more usable for more use-cases, and ways to layer it better to provide better escape valves. But that doesn't mean we should abandon a long-lived web standard that some people have found useful and that provides a reasonable starting point for further work. If the argument is that people can do it in userspace instead, that may be an argument for excavating primitive underpinnings (with the collaboration of people already building alternatives in userspace). We're using this approach in TC39 to design improved temporal APIs in JavaScript that can serve to reduce the size and complexity of userspace libraries like moment.js. Moving things to userspace, in contrast, increases the amount of shipping JS over time, something that we can all agree we should try to avoid. |
I created a web-component based MathML implementation: https://github.com/pshihn/math-ml For those waiting for full native support, this might fill in gaps in the interim. |
It is disappointing that Chrome and Edge do not have native implementations of MathML. That lack has definitely hampered wider deployment of MathML on the web, at least in terms of visual display of math. I am encouraged by recent developments including the work at Igalia that @fred-wang mentioned along with the announcement from NISO that the Sloan Foundation is sponsoring a project to add MathML support to Chromium. MathML has greatly enabled accessibility of math on the web. It is now the case that the major screen readers (JAWS, NVDA, VoiceOver) all support MathML as do many math-oriented websites (the MathML is typically invisible/hidden due to the lack of universal display). It is an understated success that someone who is blind can simply open a Wikipedia or Khan Academy page and (mostly) hear the math, review the math by navigating it, and read the math in braille on their refreshable display. The major limiting factor is that not all math in these pages uses MathML, but the vast majority does, especially for larger expressions. There is no jumping through hoops, no hitting special key combinations, it is simply read as part of the page. The web has evolved since MathML first became a recommendation and I think it would be a good idea to work on a V4 for MathML that tackles some pain points in implementation. These include:
I'm sure other people can extend this list. As @davidcarlisle and @fred-wang have mentioned, a very good start has already been done for the first two items, a strong indication that these are solvable problems. I agree with @pkra that the web would benefit from adding low level features to CSS and APIs to support math layout. Where I disagree with @pkra is the purpose of adding that support. I feel adding the support would ease the burden that browser developers face in supporting MathML and its math-oriented elements and hence lead to more browser implementations. Using layout support to justify removal of MathML because math can be displayed with styled The third item in some sense also is already in use. Both MathPlayer (of which I am an author) and @zorkow's semantic enrichment engine in MathJax internally extend MathML to allow generation of more semantically meaningful speech (e.g., recognizing P(A|B) as a probability statement or AB with a line over it as a line segment). By making such a feature standardized in MathML, authors, authoring tools, and semantic enrichment algorithms could simplify the production of semantic speech in cases where the mathematical presentation is ambiguous. It also could ease the burden on search tools for semantic searching of math for those cases . |
For what it is worth, I have fairly complex thoughts on the topic that I tried to explain on my blog, but mostly I agree with what @wycats said. If approached well, getting an implementation in blink of the core set of things here can serve both the goals of those who have created significant volumes of/around MathML content and provide foundations and paths for those who want more/better. Feedback that I've received from many different groups within the web community seem to find that as generally a positive idea. I could be over-reading one end of the feedback, but mostly, any disagreement or uncertainty seems largely around how deep this excavation should go at once and concerns that it would stop 'too high' and punt on things that should be part of CSS, for example. |
We are talking about the implementation of MathML into the browsers. If we are going to do it, do it well, please! Otherwise it will be switch off again. MathML has been criticized for being monolithic. What does it mean? My interpretation is that once you start writing MathML tags, you enter a different world with respect to HTML. The rules are not the same: some CSS do not work, you cannot mix other HTML tags, the font typesetting changes, etc. Can this be improved? If there is a general agreement about something we do not like about MathML, we can fix it. It is not easy but doable. Another important property of HTML is that the layout provided by most of the current HTML tags are also available as CSS properties. See display=table|list-item|… or vertical-align=sup|super . Following this idea, it would be great to have display=fraction, display=underover and so on. These layouts would render any HTML element in a similar way as MathML but without some of the MathML limitations: you can use any HTML element as a child, the CSS styles are always applied in a standard way, the font typesetting does not change (or any style in general), the resulting fragment does not have semantics or accessibility implications (unless you add explicitly ARIA attributes), etc. |
Just to clarify this, the point of Houdini's CSS layout API is exactly to allow defining this kind of user-defined display, so a priori it does not seem necessary to explicitly asks web engines developers to implement them natively (of course as long as users are fine implementing them in Javascript). As said above Igalia's MathML project will rely on LayoutNG (Chromium's C++ implementation of the CSS Layout API) so this is aligned with that goal and in the long term that could help to achieve your request. But IMHO at that time it's probably too soon to send such a request for new math-specific display values to the CSS-WG. |
Benetech has created a "Global Certified Accessible" program to certify publisher EPUB books have met the Accessibility 1.0 Conformance and Discovery Specification which is now under the W3C's domain. For STEM educational books which contain math publishers are encouraged to include mathML instead of just an image of the math equation. Over the past two years the DIAGRAM Center has been working on a method to allow assistive technology access to the mathML for those reading systems which can understand the MathML and for those systems which can not we have a fallback solution proposed which uses SVG and an alt text description of the math. Testing of this technique is currently underway and the results of these tests will be posted on EPUBTest.org and MathSupportFinder Publishers have millions of equations already in MathML format and they want to do the right thing and make their math accessible. Deprecating mathML completely from HTML without an accessible drop-in replacement in my opinion would be a detriment to those students who desperately need access to accessible math. Work is currently underway to try and remediate some of the issues that has prevented widespread adoption of mathML in Browsers and the current fragmentation of mathML support. The W3C has just deprecated the older versions of MathML in favor of the latest 3.0 spec. Let's not be too hasty and remove mathML completely from HTML since EPUB is built on HTML and most reading systems use HTML browser engine to render the EPUBs. |
FYI to TAG group: There is now a proposed CG to refresh the MathML spec. It has the required number of supporters and has been waiting for almost a week to become official. Hopefully that happens soon. David Carlisle has already taken Frédéric's Wang's "MathML in HTML5" to produce a strawman HTML5 profile of a revised MathML spec. This is the beginning of an effort to specify exact layout rules for MathML on the web along with aligning MathML better for the web. Once up and running with our github repository, then issues relating to the spec and Igalia's implementation in Chromium can be tracked and commented on as requested by the Chrome team. |
We have discussed this during out Tokyo F2F - here is our official response. Apologies that this took so long. Hey MathML fans! We appreciate the feedback posted above and the passion for the technology which is apparent in your responses. We also appreciate the great work that is currently ongoing in the community and the MathML in HTML5 document is a fantastic example of this. We’d like to see this community rally around creating the next iteration of the official MathML specification. As you know, there is currently no W3C Math Working Group, but that shouldn’t stop good innovation from proceeding to incubate the next iteration of the spec, for example in a Community Group. We also have some high-level feedback from an architectural level that we’d like to offer. MathML layering. In recent years, we’ve focused a lot on understanding and exposing the primitives that underpin higher levels of the web platform, and making those available to web developers in order to improve the platform’s extensibility. For examples, Web Components continue to make progress into explaining how HTML works. It’s important to us that the web platform have good layering, so that high-level MathML has as little “magic” as possible. As the next version of MathML is developed, we encourage the designers to be mindful of places where a MathML element requires special platform behavior that is not available through any other means, and consider what primitives are missing that could generally make that behavior available (to reduce or eliminate) the “magic”. Of course, this may not be possible in all cases, but the places that do require it should be well understood and documented. It looks like many folks are already thinking about how MathML can better integrate into the existing platform, and what redundant concepts can be removed, what minimal new features are necessary, etc. Of particular concern is the relationship between MathML and CSS. If MathML takes layout dependencies on concepts that are not supported in CSS, we would expect these concepts to be raised in the CSS working group for discussion. We appreciate the thinking that has already taken place and look forward to seeing the ensuing discussions. Improved interoperability requirements: The previous MathML spec was developed before the evolution to more prescriptive and detailed specifications which has become the new norm for specifications. This increased level of detail helps avoid ambiguity in interpreting the spec, which in turn helps users and web developers avoid problems with interoperability between rendering engines. We’d like to see the MathML spec embrace this new spec-authoring norm for its next iteration. Case-in-point, many of us pointed out the Rendering section of the spec has an example where it would be extremely unlikely that multiple implementations could arrive at interoperable behavior based on the current spec’s content. Tests: The other major factor that helps avoid interoperability problems between rendering engines is having a thorough set of conformance tests. It is becoming a de facto requirement for new standards to have accompanying tests anyway, so starting early for a language as large and complex as MathML will be essential. We’re excited to see MathML take its next step forward. We believe that by following these architectural principles, implementers will be able to see the value and opportunity for interoperable Math in the web platform and join the effort. Thanks again for all your comments on this thread, and good luck! |
Bonjour TAG,
I'm requesting a TAG review on behalf of XX (need to find the right folks):
Further details (optional):
You should also know that...
We'd prefer the TAG provide feedback as (please select one):
Please preview the issue and check that the links work before submitting
For background, see our explanation of how to write a good explainer.
The text was updated successfully, but these errors were encountered: