I am working on a Flutter project where I need to render LaTeX mathematical equations in a PDF. My current approach involves converting LaTeX code to SVG and then embedding the SVG in the PDF. I found a tool online at https://viereck.ch/latex-to-svg/ that converts LaTeX to SVG, but I need to integrate this process into my Flutter app programmatically.
Here are my specific requirements and constraints:
The solution needs to be implemented in Dart/Flutter.
It should be able to take a LaTeX string, convert it to an SVG, and then embed that SVG into a PDF document.
Ideally, the solution should work offline without requiring access to external web services.
Has anyone done something similar or can point me to a library or approach that can help achieve this? Any code examples or guidance would be greatly appreciated!
What I have tried:
Using the tex package to convert TeX code, but I need to convert LaTeX to SVG specifically.
Using the flutter_math package, but it does not support conversion to SVG directly.
Looking into flutter_svg, but I need help with the LaTeX to SVG conversion part.
Neeraj Ic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.