readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
553 stars 186 forks source link

MathML in switch does not render properly #306

Open rkwright opened 9 years ago

rkwright commented 9 years ago

from Jean Kaplansky: I have a sample book our team put together with MathML switching to support images where MathML is not supported.

Things work as expected in VitalSource Bookshelf Desktop - MathML renders.

I expected the MathML to render in the latest Readium Chrome extension too, but the switch is showing the images instead of the MathML. It's been a while since I've looked at this stuff, so I can't honestly remember if I've ever seen MathJax live and running in Readium or not, but I thought it was supposed to be...

all of this came to light because iBooks DOESN'T support MathML switching, so we're getting all the math 2X - both as MathML and images over there (but this is irrelevant to my Readium expectation).

Is there something about EPUBs built with MathML switches for displaying images that would cause Readium to not go the MathJax path? Or did MathJax get disabled at some point and I missed it? Or, as was the case yesterday, is MathJax still having CDN problems?

Please advise? I've attached the sample in question to this message. FYI - it validates with EPUBCHECK, but I haven't cracked the file to see if it's really what it should be regarding the switch set up in the OPF, yet.

rkwright commented 9 years ago

From Daniel Weck: I believe the old (original) Chrome extension used to support EPUB switch functionality. There's remnents of that feature in the new Chrome extension, but it's incomplete as far as I know.

rkwright commented 9 years ago

The issue here appears to be the lack of support for the switch element (as Dan indicates). There is nothing necessarily specific to MathML - it just demonstrates the problem.

rkwright commented 9 years ago

BTW, iBooks (at least on desktop, v. 1.1.1) shows BOTH the image and renders the MathML... :-) mathml-ibooks-1 1 1

danielweck commented 9 years ago

Issue specific to EPUB "switch" functionality moved here: https://github.com/readium/readium-shared-js/issues/171

danielweck commented 9 years ago

This fix should address this issue: https://github.com/readium/readium-shared-js/pull/205 To be tested...