export to EPS with text kept undivided to letters (for LaTeX's psfrag package)
Hello,
I have a rather specific problem that I was unable to solve so far. I'm using Inkscape to draw figures that are later included in LaTeX documents. Since I often need to include math in my figures, I'm using LaTeX package called PSFrag. What this package does is it parses a given EPS file a replaces specified strings by a LaTeX rendered text. This way I can combine the power of Inkscape and LaTeX together to get beautiful and easily drawn figures with the possibility of placing complex math formulas in the figure.
Now my problem. PSFrag works by searching a given EPS file for occurences of a given string. For example the command
\psfrag{t1}{$\sin^2(x)$}
will replace the occurence of the "tag" t1 by the LaTeX rendered formula sin^2(x).
The problem is, that during the conversion to EPS, Inkscape will break any text I write into letters. For example, the text "t1", meant to be replaced by PSFrag, will get translated to
(t) show grestore gsave [1.0000000 0.0000000 0.0000000 -1.0000000 384.78790 540.19971] concat /Courier findfont 12.000000 scalefont setfont 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 0.0000000 0.0000000 moveto (1) show grestore gsave [1.0000000 0.0000000 0.0000000 -1.0000000 581.42859 538.95166] concat
instead of simple (t1) show.
This causes PSFrag to miss the replacement tag "t1" since it is broken into two "show" commands.
I realize that this is probably done because of kerning. So, I tried to manually switch off kerning (for this text/and altogether) but I wasn't able to do it--I didn't find any command to do it, nor did I find it in the XML editor. I also tried to disable kerning by selecting a monospaced font but it didn't help either.
An obvious solution is to use single letter but this is rather inconvenient.
Is there anything else I might do?
Thank you!
David
participants (1)
-
David Soukal