Open StarryField opened 4 years ago
The reason for this is that MathJax sets the fill
and stroke
properties to currentColor
so that the SVG will inherit the font color in the browser. That is confusing ImageMagick and Inkscape. You need to change currentColor
to black
(or whatever color you want).
One way to do that would be to pipe your output through sed
before saving it to the file:
tex2svg "\text{TEST}" | sed -e s/currentColor/black/g > test.svg
That does the trick for me.
I tried to use
mathjax-node-cli
andimagemagick
orinkscape
onUbuntu Server 20.04 LTS
(on arrch64 bulid) to turn my math formula into.jpg
picture, but the final converted result is a blank picture! ! ! I think this is a problem withmathjax-node
, because they can convert.svg
files from other sources normallyOperating environment
Used command