Giter VIP home page Giter VIP logo

Comments (4)

dietmarw avatar dietmarw commented on July 28, 2024

Sorry I misread the information on MathJax and epub. The linked article above actually says that MathML is part of epub3 but not MathJax. MathJax could just be used to circumvent the lack of MathML in the readers per day. That is if the reader can load in and use MathJax.js

from modelicabook.

dietmarw avatar dietmarw commented on July 28, 2024

I might have found the solution. Including a local copy of MathJax under _static and linking that one instead of the CDN version will also include MathJax in the epub version. Mind MathJax is not really a small package. The size of the epub with static MathJax is about 17 MB vs. 1.5 MB with png images for math equations/symbols.

Anyway what's needed is to put the MathJax sources (174MB btw) under _static/MathJax and to add the following lines to conf.py:

 # Use local copy of MathJax (necessary for epub)
 mathjax_path = 'MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'

Adding the sources should be done via git subtree.

Mind, I have not yet tested if the epub version with static MathJax actually work. This depends of course on the epub reader. I will test this tonight. The calbre viewer should also display MathJax (Plugin which now seems to be part of calibre). In the Plugin link there is also a link to a post on how to slim down mathjax for usage in epub.

The example epub containing MathJax from the calibre page works fine but our current version of ModelicaBook as epub does not. Need to investigate further.

from modelicabook.

dietmarw avatar dietmarw commented on July 28, 2024

Turns out that at least on my Kobo Touch ebook reader not even the example mathjax.epub from the calibre page is not rendered. So I guess we should stick to dvipng created images for equations.

from modelicabook.

dietmarw avatar dietmarw commented on July 28, 2024

I added a fix in 11e366 (part of #23)

from modelicabook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.