psfrag only works if eps from inkscape does not include transparency

Bug #1192566 reported by William Fernando Oquendo Patino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Dear all,
I am using inkscape 0.48.4 on Mountain Lion 10.8.4 compiled with homebrew.
I was testing the export of eps + psfrag, and it worked (text is text and can be replaced, in contrast with previous versions as reported in bug 375323, https://bugs.launchpad.net/inkscape/+bug/375323), but, if I add a small transparency to some object in the drwaing, then psfrag makes the replacement but the final figure includes both the original and the replacing string. If I remove the transparency, psfrag works correctly (only the replacing string appears).
I am attaching a very simple svg file, which has a circle and the string HELLO, which is supposed to be replaced by psfrag by, let's say, \LaTeX . Just remove and add transparency.

How to reproduce:
- Add some transparency to the circle (already added in the attached svg, just 97.9 %).
- Export to eps
- Use psfrag to replace the HELLO string.
- Convert the dvi to pdf or ps and check the results.
- Remove transparency and reexport.
NOTE: The dvi seems to have the correct info replacement, but cannot be read completely so I am unsure.

System info:
Mountain Lion 10.8.4
Inkscape 0.48.4
Compiled with homebrew formula, no poppler.
pkgconfig 0.28
intltool 0.50.2
boost-build 2011.12-svn
boost 1.52
gettext 0.18.2
bdw-gc 7.2d
glibmm 2.36.2
gsl 1.15
popt 1.16
little-cms 1.19
cairomm 1.12.8
cairomm 1.10.0
pango 1.34.0
Xcode 4.6.3
gcc 4.2.1

Tags: latex eps psfrag
Revision history for this message
William Fernando Oquendo Patino (woquendo) wrote :
Revision history for this message
William Fernando Oquendo Patino (woquendo) wrote :

The example after-psfrag output.

Revision history for this message
Johan Engelen (johanengelen) wrote :

EPS does not support transparency, probably the cause of your troubles.
This will not fix your issue, but might be a workaround (perhaps preferred over psfrag):
Are you aware of the new EPS/PS/PDF+LaTeX save option?
ftp://ftp.dante.de/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf

Revision history for this message
William Fernando Oquendo Patino (woquendo) wrote :

Thanks a lot for your fast reply.
I did not know that EPS does not support transparency. Sorry for that. Please let me ask you: how does inkscape manage to export to eps if the drawing has transparency? (just want to know to reduce my huge ignorance :) )
Yes, I know about the new export + Latex option. It is a good option for few equations but for complex /and/or many replacements psfrag is much better. For example, I have a simple script which reads the eps and the psfrag replacements and produces the graph. If I want to change a symbol, or to add boldmath, or a color to the latex equations, I will just edit the psfrag inputs (text file, easy, batch support) and recall the script, getting the new graph fast. Within inkscape I will have to do many clicks. And that is just for one figure. For a bunch of figures psfrag will be much well suited for the job. But of course, maybe there is a better way and I just need to get used to.

Revision history for this message
Johan Engelen (johanengelen) wrote :

Well, I hate EPS, so my first advice is to ditch that in favor of PDF.
What you do with psfrag is replace a string with some other string. You can do the same with PDF+LaTeX export, by simply typing /commands/ in the Inkscape drawing (say "\string1" and "\string2"). And then you define those commands with the strings you want:

\def\string1{bla bla bla}
\def\string2{bla bla}
\input{inkscapefigure}

something like that

Revision history for this message
William Fernando Oquendo Patino (woquendo) wrote :

Ok. That's great !
Still, the result after and before transparency (in the way is managed by inkscape for an eps) seems to be a bug, right? or not?

Beluga (buovjaga)
Changed in inkscape:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.