# should MathML dictate a specific graphical rendering

6 messages
Open this post in threaded view
|

## should MathML dictate a specific graphical rendering

 Rather than discussing whether MathML is a failed standard, web or otherwise, I recommend we discuss specific, constructive topics. I suggest the discussion be in the context of MathML where appropriate, not because I want to defend MathML but because it is an existing standard. It is a place to start. If the solutions we reach replace MathML all or in part, so be it. Let's not start by throwing it out but by addressing its problems. We can certainly create a new standard if MathML can't be fixed. Finally, if this is the wrong venue for this topic or any other, please suggest a better one. If there are other parties that need to know about the discussion, please let them know. Assuming others agree, let’s start with perhaps an important issue. Should Presentation MathML dictate a specific rendering or leave formatting choices up to the renderer. Peter says, "I have the impression people generally expect consistent rendering across browsers. But anecdotal evidence is, well, anecdotal." I would agree with this statement. People do expect this. I believe they get that expectation from TeX but it does make sense. Why would a user want a different rendering in a different browser? The reason I said "no" to this before was because the MathML spec leaves a lot of rendering decisions up to the implementation. Someone reading the MathML spec should NOT expect all renderings to be the same. In fact, the spec doesn't specify the rendering at the required level of detail. Doing so would be difficult. TeX doesn't specify its rendering in detail either except via the code itself. In other words, the only proper rendering of TeX is that done by TeX itself. We could create a MathML 4 in which the graphical rendering is specified in writing and in detail. Implementations would be constrained much more than by the current spec. Another way to achieve this goal is to create a reference implementation. This would be the TeX way, or close to it. We could even map MathML onto TeX somehow and then defer to TeX's rendering. The MathML spec would be annotated by TeX templates (perhaps macros) that serve to define the rendering. The reference implementation would consist of a MathML-to-TeX convertor and the TeX engine itself. Implementations that intend to abide by the MathML 4 spec could use the reference implementation or roll their own. When I say rendering above, I only mean graphical rendering. When we talk about audio or braille rendering, things are much less clear. The state of the art in MathML-to-speech has certainly not reached a point where everyone can agree. Besides, there is personal taste of the reader and multiple languages to consider. Ok, I'll stop there and take a breath. Paul
Open this post in threaded view
|

## RE: should MathML dictate a specific graphical rendering

 Paul commented "TeX doesn't specify its rendering in detail either except via the code itself. In other words, the only proper rendering of TeX is that done by TeX itself."   Actually Appendix G of The TeXbook describes how TeX lays out math. The Office math layout program uses the algorithms therein, which is why the results look so much like TeX. The actual code is completely different from TeX’s, but the layout principles are generally the same.   It’s good to have this discussion. Clearly Presentation MathML is used a lot for interchanging math zones between programs. Also I haven’t given up on the idea of the browsers rendering MathML well natively. If IE ever succeeds, it’ll likely look like TeX, since both IE and Edge use LineServices. And it should be way faster than Java script code.   My main complaints about Presentation MathML are 1) lack of an explicit n-ary element (for integrals, summations, products, etc.) and 2) lack of document level math properties, like default math font. Also Presentation MathML depends too much on proper use of , which wouldn’t even be needed if the elements were all “prefix” elements like and . But infix notation can be translated to prefix notation, a good example being conversion of the linear format to the OMML-like internal format for LineServices. Similarly RichEdit’s MathML reader converts using the rich-text string stack originally developed for the linear format.   The bottom line is that MathML isn’t perfect, but it’s a widely used standard and gets the job done. As such, it’s hardly a failure. And it’s nicely supported on the web thanks to MathJax.   Murray
Open this post in threaded view
|

## RE: should MathML dictate a specific graphical rendering

 Murray,   I guess I forgot about Appendix G of the TeXbook. Thanks for the correction. Did you find that it defined the rendering accurately enough for your line services implementation? Since it has OpenType ‘math’ table support, does it really render exactly as TeX? I guess one could say that the two implementations render the same modulo the fonts used. Did your line services improve on TeX math rendering at all or fill in any gaps in Appendix G. Were there any concessions made to compatibility with layout of non-math text?   I am not asking these questions to argue against your point. I’m just suggesting that while a reader may regard two renderings as being equal, there may still be unavoidable, or by-design, differences due to variations in rendering technology, software environment, and other considerations.   Paul   From: Murray Sargent [mailto:[hidden email]] Sent: Friday, April 8, 2016 2:34 PM To: Paul Topping <[hidden email]>; Daniel Kinzler <[hidden email]>; Moritz Schubotz <[hidden email]>; [hidden email]; Peter Krautzberger <[hidden email]> Cc: Wikimedia developers <[hidden email]>; wikidata-tech <[hidden email]> Subject: RE: should MathML dictate a specific graphical rendering   Paul commented "TeX doesn't specify its rendering in detail either except via the code itself. In other words, the only proper rendering of TeX is that done by TeX itself."   Actually Appendix G of The TeXbook describes how TeX lays out math. The Office math layout program uses the algorithms therein, which is why the results look so much like TeX. The actual code is completely different from TeX’s, but the layout principles are generally the same.   It’s good to have this discussion. Clearly Presentation MathML is used a lot for interchanging math zones between programs. Also I haven’t given up on the idea of the browsers rendering MathML well natively. If IE ever succeeds, it’ll likely look like TeX, since both IE and Edge use LineServices. And it should be way faster than Java script code.   My main complaints about Presentation MathML are 1) lack of an explicit n-ary element (for integrals, summations, products, etc.) and 2) lack of document level math properties, like default math font. Also Presentation MathML depends too much on proper use of , which wouldn’t even be needed if the elements were all “prefix” elements like and . But infix notation can be translated to prefix notation, a good example being conversion of the linear format to the OMML-like internal format for LineServices. Similarly RichEdit’s MathML reader converts using the rich-text string stack originally developed for the linear format.   The bottom line is that MathML isn’t perfect, but it’s a widely used standard and gets the job done. As such, it’s hardly a failure. And it’s nicely supported on the web thanks to MathJax.   Murray
Open this post in threaded view
|