Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

using svg2png with mjpage from command-line #84

Open
ronligt opened this issue Jun 12, 2020 · 1 comment
Open

using svg2png with mjpage from command-line #84

ronligt opened this issue Jun 12, 2020 · 1 comment
Labels

Comments

@ronligt
Copy link

ronligt commented Jun 12, 2020

We're using mjpage from the command-line to render a lot of equations on a lot of html-pages to SVG. This works great!

Just very recent we're experiencing problems with SVG in Cordova on the latest iOS. As a temporary solution we want to render the equations to PNG (instead of SVG) with the mathjax-node-svg2png package. We can't however find a way to use this functionality directly from the command-line with mjpage.

Is there a option we need to add to mjpage to create PNG-files?
Are links to these PNG-files automagically inserted in the original HTML file in place of the equations?

Kind regards,
Ronald

@pkra
Copy link
Owner

pkra commented Jun 12, 2020

Is there a option we need to add to mjpage to create PNG-files?

I'm afraid there isn't. The easiest workaround would be to modfy ./bin/mjpage to suit your needs, i.e., along the lines of the instructions at https://github.com/pkra/mathjax-node-page#mathjax-node-customization.

Just very recent we're experiencing problems with SVG in Cordova on the latest iOS.

It sounds painful to have to go back to PNG on a modern OS. Are you able to share some details?

(FWIW, I would also advise to look at switching to mathjax v3 which supports NodeJS out of the box.)

@pkra pkra added the question label Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants