CLI export to SVG doesn't render LaTeX (but exports correctly in GUI)
Preflight Checklist
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.
Math between \( \) will render correctly when using SVG export in GUI, but when exported to SVG using CLI the 'source' LaTeX markup is shown.
This appears to have regressed, as the same issue was reported two years ago as issue #223, and then apparently fixed.
Tested on MacOSX Draw.io 24.7.8 (the latest desktop version)
To Reproduce /Applications/draw.io.app/Contents/MacOS/draw.io -x -f svg -o figure.svg input.drawio
Same on NixOS with 24.7.8
- Image with Issue:
- Intended Image
- I am experiencing the same issue. Kubuntu 24.04.1, DrawIO v24.7.17.
- Exported with following CLI command:
drawio -x -f svg --scale 2 "$filename.drawio" -o "${filename}.svg"
Verified with newly released desktop client 25.0.2 that math is now being rendered with command line export (as mentioned in release notes). Two differences between GUI and CLI export continue to block automation for me:
-
Math exported via CLI is not anti-aliased. I don't know enough about SVG format to debug the file differences further. I've tested with default export settings as well as --scale 1.25, and it lacks the anti-aliasing of the GUI export in both cases. Screenshots of CLI and GUI exports, respectively (note the 1/sqrt(d_head) and the numbers in the bottom row of boxes, which are (math) text, as opposed to the top numbers which are regular text, and anti-aliased correctly):
-
SVG export via CLI doesn't honor --border. Perhaps same root cause at the issue about JPEG export not honoring --border: #1835
I'm happy to open a new issue for the anti-aliasing if you prefer to close this one, since math is now rendering--if poorly. Thanks!
Thanks, will be fixed in the next release If there is still an issue, please open a new issue