mathjax-node with sre and svg2png

64 views
Skip to first unread message

Tim Arnold

unread,
Apr 6, 2018, 10:33:54 AM4/6/18
to MathJax Users
hi,
I would like to use the mathjax-node distribution but with speech rule engine and svg2png capabilities.
I see that I can use one or the other (mathjax-node-sre or mathjax-node-svg2png).

Is it difficult to combine those? Can you point me to instructions or an article about it?

I'm rewriting code from the old version of mathjax-node which had the capabilities.

thanks,
--Tim

Peter Krautzberger

unread,
Apr 6, 2018, 11:26:20 AM4/6/18
to mathja...@googlegroups.com
Hi Tim,

mathjax-node-sre can be used as both a pre and post processor so that gives you two way of combining them.

I haven't maintained mathjax-node-svg2png much recently because I don't use this kind of approach in production (it's usually too inefficient, e.g., duplication, hooking in zopfli etc); also phantomjs is dead.

However, there's Google's puppeteer library now (i.e., node APIs for Chrome headless) so png conversion is rather simple -- here's an 8 line example I cooked up for a workshop recently.

Best,
Peter.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Arnold

unread,
Apr 6, 2018, 11:38:16 AM4/6/18
to MathJax Users
Hi Peter,
Thanks for that info. I will use mathjax-node-sre and wire up that svg2png function to get the pngs. Thanks for that example!
--Tim
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages