Looking to integrate TeX equations in a TeX-agnostic fashion, suitable for either ConTeXt or LaTeX, into a Java-based desktop Markdown editor. The possibilities are numerous, but I’m not sure what approach to take.
JMathTex outputs to MathML, which must be transformed. JEuclid can transform MathML to
BufferedImages (not 100% sure). Neither are JDK 14-friendly and may be too slow to render in real-time. I haven’t looked because I read that they didn’t work with Java 9 (without porting effort), much less 14. Also, the licensing isn’t LGPL, which probably won’t work with the MIT licensing.
Java LaTeX Report requires a TeX engine.
JLaTeXMath does an exceptional job at rendering, though investigation would be required to see if it can perform real-time renders, output as SVG, or otherwise determine if it can integrate with FlyingSaucer.
Still another possibility is the TeX to MathML service. This is written in Java, but the source code is not available anywhere. I’ve reached out to some people involved in the project.
For native speeds, there may be a (cross-platform?) C-based TeX engine that can generate MathML or SVG from a TeX input. If so, it may be possible to integrate with the JNI.
Here’s a demo video of the app, to give you an idea of what is needed:
What approach would you take and what do you see as its benefits and drawbacks?
Go to Source
Author: Dave Jarvis