Closed arthurattwell closed 5 years ago
We may also need mathjax-node-svg2png.
These resources will be useful:
https://github.com/pkra/mathjax-node-page https://www.npmjs.com/browse/depended/mathjax-node-page https://github.com/pkra/mathjax-node-page/issues/14 https://www.princexml.com/forum/topic/2971/using-mathjax-with-princexml https://github.com/roman-spiridonov/gulp-mathjax-page/blob/master/README.md https://github.com/roman-spiridonov/gulp-plugin-fabric https://github.com/pkra/mathjax-node-page/pull/50
Good progress on this in this branch.
So far, I have math working in PDF on Windows without PhantomJS. The output script uses gulp + mathjax-node-page to convert TeX to MathML before passing the HTML to Prince. It's much faster than using PhantomJS and the rendered math looks better. We'll need lots of testing in the wild to see where and whether we encounter issues with fonts.
Still to do:
Work-in-progress notes:
Epub readers that support Javascript well can render MathJax just fine (surprisingly, Adobe Digital Editions). But other readers can't, including Kindle via Kindlegen.
We might be able to include a processing step using
mathjax-node
orgulp-mathjax-node
to turn the maths into PNG (usingmathjax-node
) or SVG (usinggulp-mathjax-node
, which doesn't provide PNG rendering).