
View Full Version : Epub Revision  mathematics support
Nate the great 04082010, 08:32 PM No native support for mathematics. The lack of a native schema to represent mathematical equations (MathML) limits applicability and interoperability of eBook in the textbook and academic publishing segments.
I'm running out of new ways to invite comment.
alecE 04082010, 10:50 PM I'm certainly not expert on the technicalities of the epub standard, but support for maths equations is definitely required  I'm suffering through a book with just a few equations, which (on my Sony 550 at least) show in smaller type, in a delicate shade of unreadable light grey, and cannot be enlarged to a legible size. OK, end of rant; yes, mathematical equation support required. :)
DawnFalcon 04082010, 10:53 PM ...MathML requirement.
Really, it's not that hard to figure out the solution.
pholling 04082010, 11:48 PM What THEY said
I want to at the least be able to present equations legibly, and hopefully plug in some values. Quizzing for technical subjects is more about choosing the right set of equations than being diligent enough to not screw up the answer.
frabjous 04082010, 11:49 PM Yeah, just including MathML in the spec seems like the no brainer solution.
I am curious though what it mean with regard to math font support. Would it then be required that any ePub device come with a full stock of symbol fonts? Perhaps the STIX fonts, or any font set with the same range of coverage. How feasible is this? I don't really have a good sense of this.
HarryT 04092010, 05:10 AM An equation is simply a graphic. Can this not be done with SVG?
pdurrant 04092010, 05:29 AM Having just done a little [more] research to refresh my memory of TeX, and to find out a little about MathML, it's a nobrainer.
The next ePub specification needs to include [presentation] MathML as a required component. I'm not entirely sure without looking into it more deeply than I want to, whether content MathML is needed.
http://www.mathmlcentral.com/history.html is a fairly succinct summary (granted, from what might be a biased source). There seems to be plenty of work going on on ways to get TeX quality typesetting from MathML expressions, and the ability to copy/paste from MathML to ctual methematical evaluation software seems an important ability that any purely layout based system (i.e. TeX) can never match.
It is possible to typeset equations using an SVG graphic, but these are awkward to create, and only a little better than a bitmap version.
WillAdams 04092010, 08:23 AM HarryT, an equation is a bit more complicated than a graphic  it's a serial description of a complex statement which is spread out along two axes. Granted, one could brute force this by doing all equations as SVG but then:
 they wouldn't be breakable / reflowable
 they wouldn't be readable (by screen readers / TTS)
 they wouldn't be guaranteed to line up nicely on the baseline if the text size was changed
 they wouldn't be editable as equations
What was the point of developing MathML if it's not to be used in such situations?
William
HarryT 04092010, 09:02 AM What was the point of developing MathML if it's not to be used in such situations?
William
I was just asking whether SVG couldn't fulful the same requirements. From what you've said, it clearly can't (I hadn't considered such things as screenreaders). Thank you for your lucid explanation.
Nate the great 04092010, 10:29 AM An equation is simply a graphic. Can this not be done with SVG?
You could also put the text of a book in a graphic. Do you think that's a good idea?
The thing is, equations have been put in images not because it was a good idea, but because that was the only way to do them. The alternative was to not have them at all.
HarryT 04092010, 10:35 AM You could also put the text of a book in a graphic. Do you think that's a good idea?
Occasionally, yes. If you just want a small snippet of text that's in a different character set, and you don't know whether or not all your target readers will be able to display it, then using a graphic can be a good solution.
pdurrant 04092010, 10:57 AM Occasionally, yes. If you just want a small snippet of text that's in a different character set, and you don't know whether or not all your target readers will be able to display it, then using a graphic can be a good solution.
But with ePub a much better solution is to embed a small subset of the font in question and format the text with that..... until Apple went and created an ePub reader that doesn't support embedded fonts!
I really hope they fix that soon.
HarryT 04092010, 02:13 PM OK, let's suppose that MathML is adopted as a part of the ePub standard. What will happen with all the ePub devices which don't support it? Is it possible to say "if the device supports MathML, display the equation properly; if not, display this SVG image" or something of the sort?
frabjous 04092010, 02:17 PM But with ePub a much better solution is to embed a small subset of the font in question and format the text with that..... until Apple went and created an ePub reader that doesn't support embedded fonts!
Yeah, it's completely ridiculous. With font embedding, you can do a decent job formatting most equations just with HTML and CSS and the right symbols. Of course, MathML would make it much easier, but it still uses symbols that come from a font. MathML support without font embedding support (or a requirement that certain symbol fonts be available) would be worthless.
Even SVGs often have text components (and SVGs used for equations, whether converted from MathML or not, pretty much always do), and the font still needs to be available to display the SVG correctly.
The iPad just pisses me off in so many ways. Oh no, if we let people use custom fonts in their documents it might offend Steve Jobs's aesthetic sensibilities. Far better that we keep people unable to read mathematical texts; after all, math might lead to engineering, and engineering might lead to noticing that the darn iPad can't be opened.... sigh...
Jellby 04092010, 02:34 PM OK, let's suppose that MathML is adopted as a part of the ePub standard. What will happen with all the ePub devices which don't support it? Is it possible to say "if the device supports MathML, display the equation properly; if not, display this SVG image" or something of the sort?
Yes, that could be done with "fallbacks", which are already a feature of the current spec (if the reader supports this feature, use this content, if it doesn't, use this other "supportisrequiredbythespec" content instead).
If MathML is addopted as a required feature of the next standard (say ePUB2), then some readers will be ePUB2 compliant, some readers will be only ePUB, some books will only work fine with ePUB2 (if they include MathML content with no fallback), some will work with ePUB or ePUB2 (if they don't have MathML, or if they include proper fallback). Current ePUB readers will continue reading ePUB books, future ePUB2 readers will be able to read both ePUB and ePUB2 books. In the worst case, it won't be much worse than the current situation with SVG, fonts, etc.
HarryT 04092010, 02:37 PM Yes, that could be done with "fallbacks", which are already a feature of the current spec (if the reader supports this feature, use this content, if it doesn't, use this other "supportisrequiredbythespec" content instead).
Excellent. That sounds like a good solution, then.
pholling 04092010, 11:37 PM Dumb pixels won't take advantage of the medium. Reading on a computer, I'd like to plug in some values, and get a sense for what a reasonable range of answers is.
The information that makes it an equation could be pasted into a different application that lets you combine with other equations, rearrange terms, check for consistent units, plot results, etc. I'd learn a lot more that way!
Fat Abe 04142010, 04:15 AM Three standard math programs which engineers and scientists use are Mathematica, Matlab and Mathcad. Each has its own syntax. Favoring MathML as a standard would upset the other two vendors. When you throw in spreadsheet software or even a standard language like Fortran or C, you have another can of worms, due to function naming.
None of the three core programs displays equations in a pretty format, not even for simple matrices. That would involve another standard, with "typesetting" thrown into the consideration. Since any given equation can result in a number of renderings, where do you stop the process of "beautifying" the resulting graphic image? This is why I always spend a lot of time adjusting the positions of symbols when I write a technical paper. I know, this is terribly backward. It leads to errors, since an author may have already validated an equation in his/her math app, only to see a sign added/omitted in the published version, which he probably generated in a word processing app. And don't expect a reviewer to catch the error. It's frustrating.
frabjous 04142010, 10:24 AM ... Mathematica, Matlab and Mathcad. Each has its own syntax. Favoring MathML as a standard would upset the other two vendors...
...which of these three is associated with MathML? I thought MathML was developed by the W3C, but will happily claim ignorance.
For typesetting, mathematicians tend to use LaTeX anyway, no? For ePub though it seems more natural to use a variant of XML.
WillAdams 04142010, 10:38 AM Fat Abe, if you were using LaTeX (and all of those programs can export to LaTeX format MathCAD needs an external utility) this wouldn't be an issue. All three programs have varying abilities to natively export to MathML (believe me, _no one_ wants to write MathML out by hand).
http://www.lyx.org is a nice graphical frontend to LaTeX which you really should try.
William
DawnFalcon 04142010, 12:10 PM Since any given equation can result in a number of renderings, where do you stop the process of "beautifying" the resulting graphic image?
In MathML? Presentation vs Content versions. It explicitly provides for that.
And yes, MathML is an open standard developed by the W3C.
Also, the "XML Entity Definitions for Characters (http://www.w3.org/TR/2010/RECxmlentitynames20100401/)" has just been adopted as a W3C recommendation, and as a required element alongside MathML in ePub should allow easier universal display of formulae.
Fat Abe 04142010, 01:43 PM I was interested in the content part, as another user thought it would be prudent to design in a syntactical representation of a formula, say y= m*x+b, where the reader would be able to manipulate m or b, and then to see the result graphed in the document. Is W3C thinking this far ahead? We'd all like to write once and deploy everywhere.
I had a question about the path from Content > Presentation. Is this up to the provider of the translator software?
WillAdams 04142010, 01:56 PM Yes, one can do that sort of thing, but none of the static document formats allow for it, AFAIK, one has to use a programming environment  best example of that would be _Euclid's Elements_ Joyce's Java Version:
http://aleph0.clarku.edu/~djoyce/java/elements/elements.html
Or maybe SVG, but I'm not aware of a documentviewing tool which allows the more dynamic aspects of SVG w/o backend server support.
William
DawnFalcon 04142010, 02:16 PM I had a question about the path from Content > Presentation. Is this up to the provider of the translator software?
There's no ">". They're different forms of the standard, intended for different uses, and both are fully displayable. (I'd stress that MathML is purely a display language, you do the layout in your choice of editors and then convert)
