Open rfhits opened 2 years ago
When using a browser engine that doesn't support MathML yet (i.e. Chromium), you need to use something like MathJax. See https://github.com/futurepress/epub.js/blob/master/examples/mathml.html.
I tried. I replace the book url, but the math equation remains the same.
The example is broken. It needs to be updated to set allowScriptedContent
to true
. See https://github.com/futurepress/epub.js/blob/master/README.md#scripted-content
not work.
I notice that some requests were sent by the mathjax, does it matters?
tree of my files:
.
|- ajax-loader.gif
|- epub.js
|- epubjs-mathml.html
|- examples.css
|- Fundamentals-of-Computer-Graphics_5th-edition.epub
some requests from mathjax:
I notice that some requests were sent by the mathjax, does it matters?
Yeah, if you're using the CDN then it should be fetching resources from the CDN, not 127.0.0.1:5500. I don't know what could be causing this, though.
But at least the examples/mathml.html
page works if you clone Epub.js, run npm install, and open the page directly in the browser. So in your case, probably either MathJax isn't included properly or some additional configuration is required for it to resolve resources correctly.
the book: "Fundamentals-of-Computer-Graphics_5th-edition.epub"
the equation in 2.1.3 Logarithms:
rendering result of epub.js:
should be rendered as:
the size of this epub file is 32MB, so I put it in the google dirve: https://drive.google.com/file/d/1snuFibTRnWjLmjUM_q_jKSJ5OG8Rx7_v/view