I create plots in gnuplot that I export as svg and include in a LaTeX document.
I would like to type simple LaTeX formula directly in gnuplot that appear properly in the LaTeX document. I noticed that I can do for instance:
set output "pic.svg"
set terminal svg
set label "$x$" at 1,1
plot 1/0
and the "x" is properly typeset in italics just like in LaTeX math mode. If I try the same with a more sophisticated formula like
set label "$\frac{x}{2}$ at 1,1
plot 1/0
I run into two problems:
- The exported svg does not contain backslash nor curly braces. The label appears as "$fracx2".
- Even if I edit the svg manually to add the braces and backslash back, the resulting pdf after running
pdflatex --shell-escape document.tex
does not contain the fraction.
How can this be fixed? Ideally I'd stick with the svg-route if possible.
I use \usepackage{svg} , \includesvg and pdflatex to include the svg file.
epslatex
,cairolatex
, ortikz
terminal?