vivliostyle / vivliostyle.js

📖 The power of CSS typesetting, right at your fingertips.
https://vivliostyle.org
GNU Affero General Public License v3.0
598 stars 52 forks source link

Support MathJax3 #813

Open depth42 opened 2 years ago

depth42 commented 2 years ago

Today I tried to use MathJax3 together with Vivliostyle and realised that it does not work as is. Are there any plans to support the newer version of the library?

MurakamiShinyu commented 2 years ago

Currently, Vivliostyle's math support relies on MathJax2, and updating it to MathJax3 will be not very simple task. We have no plan for now.

If Vivliostyle can enable JS libraries specified in HTML document, MathJax3 also can be enabled, hopefully. That's also a challenge:

depth42 commented 2 years ago

Thanks for the clarification!

MurakamiShinyu commented 2 years ago

Vivliostyle.js v2.13.0 has been released, with JavaScript support:

Test: https://github.com/vivliostyle/vivliostyle.js/issues/733#issuecomment-1007280184

Test MathJax v3 samples on https://mathjax.github.io/MathJax-demos-web/

Please note that Vivliostyle.js still has built-in MathJax 2 support (see FAQ: How to embed math formulas (MathML, TeX or AsciiMath)), and now can enable MathJax 3 specified in the document but that is far from perfect, as you see wrong page breaking/overflow problem in the test result. This is a limitation due to the implementation of JavaScript support in Vivliostyle.js for now (would like to improve it in the future).

Screen Shot 2022-01-20 at 11 35 31