Hello,
as soon as I import mml-svg.js (any version, tried 3.x and latest 4.0 beta) of MathJax into an EPUB3 content XHTML document, Apple Books refuses to paginate that document. There need not be a MathML formula in that page at all, merely adding the script prevents the pagination.
Has anyone run into this as well, is there a solution?
Details:
I downloaded the MathJax-4.0.0-beta.4 .
I added mml-svg.ja to the EPUB under /js/, and added the following line to the OPF manifest:
<item id="script1" href="js/mml-svg.js" media-type="text/javascript" />
I added the "scripted" and "mathml" properties to the content document in the manifest:
<item id="chapter-1" href="chapter-1.xhtml" media-type="application/xhtml+xml" properties="scripted mathml" />
In the content document "
chapter-1.xhtml", I include the mml-svg.js like this:
<script src="js/mml-svg.js"></script>
The content document does not contain any MathML – still, Apple Books (Version 6.2 (6030) on macOS) does not paginate the content document - it only displays the first "page", and also does not show its usual "1/x" page position info.
In the Console, the nearest possibly relevant line I can find is:
fault 16:51:45.363090+0100 Books com.apple.iBooks multi-js evaluation failure - Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=2, WKJavaScriptExceptionMessage=TypeError: null is not an object (evaluating 't.cssValueType'), WKJavaScriptExceptionColumnNumber=5644, WKJavaScriptExceptionSourceURL=ibooks-script:content_support.js, NSLocalizedDescription=A JavaScript exception occurred}
which looks like there is occurring some exception during processing of the content the content document, but I am not sure if this might be related to the MathJax library.
I am attaching the EPUB I used for testing. It does not paginate for me as attached. It does paginate in Apple Books when I comment out the <script src="js/mml-svg.js"></script> line from the content document.
What could be the issue?
Thanks so much,
Christian