Use MathJax for MathML equation rendering

Are you missing a feature? Request its implementation here.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Use MathJax for MathML equation rendering

Post by chrispitude »

Currently, Oxygen uses the JEuclid library to render MathML equations. Development activity for JEuclid appears to have ended in 2010, although there are some personal Github forks floating around to fix various issues.

It would be great if Oxygen could move to the MathJax rendering library. MathJax is open-source, actively developed, and fiscally supported by many companies. MathJax recently released their 3.0 release, which was a ground-up writeup to improve both speed and API simplicity:

http://docs.mathjax.org/en/latest/upgra ... w-3.0.html

MathJax is configurable via a standardized configuration file:

http://docs.mathjax.org/en/latest/options/index.html

which could be included in a project or framework directory, then shared (or overriden) by the various Oxygen components that work with equations (editor, WebHelp, PDF Chemistry, etc.).

MathJax would also opens the door for native TeX and ASCIImath support in DITA authoring and production in Oxygen.
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use MathJax for MathML equation rendering

Post by Radu »

Hi Chris,

Thanks for the suggestion, we have two issues registered for this: CH-485 (for Chemistry) and EXM-39486 (for visual editing in the Author mode).
We'll update this forum thread if we manage to use MathJax in any of these places.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Use MathJax for MathML equation rendering

Post by chrispitude »

I noticed today that Github now supports LaTeX-format equations when displaying Markdown documents:

https://github.blog/changelog/2022-05-1 ... -markdown/

I also noticed that it's using MathJax to render the LaTeX equation content, and it made me think about how handy it would be to place LaTeX-format equations directly into DITA documents. This led me to Radu's quite interesting work at

https://www.oxygenxml.com/doc/versions/ ... tions.html

which I will need to find time to play with!

And perhaps if Oxygen explores MathJax functionality for publishing, maybe it could also explore it for editor rendering too... which might open the door to native rendering of LaTeX as well as MathML in the editor...

And because LaTeX is hand-writable for all but the most complex of equations, an interactive LaTeX equation text editor in Oxygen with real-time preview would almost completely bypass the need for an external equation editor...

(Unfortunately Libre Office Math only saves as MathML, not LaTeX, so it couldn't be used as a GUI editor for the really complicated equations.)

Anyway, just daydreaming. :)
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use MathJax for MathML equation rendering

Post by Radu »

Hi Chris,
We do have a sample plugin for rendering Latex equations in the Author visual editing mode:
https://blog.oxygenxml.com/topics/addin ... -dita.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply