Generate a pre-processed output

46 views
Skip to first unread message

Lawrence

unread,
Jul 28, 2021, 5:03:35 PM7/28/21
to MathJax Users
Hi.

Is it possible use mathjax to generate a processed output containing the html and formulas in image format so it can be used in sites that allow posting html ?

Thank you.

Phil Perry

unread,
Jun 3, 2022, 5:51:21 PM6/3/22
to MathJax Users
I'm trying to find out myself how to process MathJax input "offline" and create either an HTML file or an SVG file. So far, it looks like I would have to install NodeJS and run a command-line utility such as tex2svg (from GitHub/mathjax/MathJax-demos-node), using a headless Chrome browser. I'm hoping for a cleaner way to import MathJax source (rendered) into a PDF for scalable display.

Murray

unread,
Jun 4, 2022, 8:24:22 PM6/4/22
to MathJax Users
I suggest it's best not to look for PNG-type solutions.

Here are 3 approaches for getting SVGs of math:

https://latextosvg.com/ or https://lwczy.github.io/Latex2SVG/ (which allow you to download the SVG, which you could then paste into a text box;

or

https://dev.to/uetchy/math-api-latex-math-as-svg-image-m4p is an API that lets you specify the LaTeX in a query string. This is probably the easiest, but if the site goes down in the future, you have no math. 

or

MathJax itself produces SVG output if you use the version with "svg" at the end of the jsdeliver URL, like this https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg

Some of the above sites have taken such output and packaged it as SVG-only.

Regards
Murray

Reply all
Reply to author
Forward
0 new messages