Hi all, I posted this comment on the gnomedesktop.org article about Inkscape and am reposting it here in case none of you read that article.
I've just started using Inkscape and am mighty impressed. The collection of tutorials that comes with the program is great and got me up to speed very quickly.
I have one major stumbling block to using this program in the way that I want to though:
I would like to create vector graphics with Inkscape, then save them to EPS and use those EPS figures in LyX (LaTeX) created documents. Currently (inkscape-0.41-1, lyx-1.3.5-3) I cannot do this with figures that have transparency or gradients. What happens is that EPS exported figures with more than a single layer are completely munged so that a single plane of color is produced. PNG exported are slightly better.
So here's a sort of work around if anyone has the same problem: use Scribus to take the SVG file and export it to PDF or PNG.
I should add to the above that when exporting a multi-layered SVG document to PDF using Inkscape the same problem occurs. However scribus-1.2.1-3 is able to get the layering and gradient fill correct with PNG exports and the layering correct with PDF exports (but not the gradient, even if I choose the Acrobat-5.0 compatibility)
Hope this helps someone out and is useful feedback to the developers whom I must thank again. Oisin Feeley
On Mon, 7 Mar 2005 11:50:29 -0800, oisin feeley <ofeeley@...155...> wrote:
I would like to create vector graphics with Inkscape, then save them to EPS and use those EPS figures in LyX (LaTeX) created documents. Currently (inkscape-0.41-1, lyx-1.3.5-3) I cannot do this with figures that have transparency or gradients. What happens is that EPS exported figures with more than a single layer are completely munged so that a single plane of color is produced. PNG exported are slightly better.
So here's a sort of work around if anyone has the same problem: use Scribus to take the SVG file and export it to PDF or PNG.
PS and EPS do not support transparency, there's nothing we can do about it. PS level 3 however supports gradients, and the CVS version of Inkscape exports gradients (without transparency) correctly to PS or EPS.
For PDF, you can either use Scribus or convert Inkscape-exported PS to PDF.
As for PNG, our export is completely wysiwyg. No need to use any other tools.
However scribus-1.2.1-3 is able to get the layering and gradient fill correct with PNG exports
PNG format does not have any layers. As for gradients, they were always exported correctly to PNG from Inkscape. What is the problem with that?
and the layering correct with PDF exports (but not the gradient, even if I choose the Acrobat-5.0 compatibility)
Try EPS export from Inkscape CVS and then ps2pdf from Ghostscript or Adobe Distiller. Gradients should work (but, again, without transparency).
On Mon, 7 Mar 2005 16:07:45 -0400, bulia byak <buliabyak@...155...> wrote:
On Mon, 7 Mar 2005 11:50:29 -0800, oisin feeley <ofeeley@...155...> wrote:
I would like to create vector graphics with Inkscape, then save them to EPS and use those EPS figures in LyX (LaTeX) created documents. Currently (inkscape-0.41-1, lyx-1.3.5-3) I cannot do this with figures that have transparency or gradients. What happens is that EPS exported figures with more than a single layer are completely munged so that a single plane of color is produced. PNG exported are slightly better.
So here's a sort of work around if anyone has the same problem: use Scribus to take the SVG file and export it to PDF or PNG.
PS and EPS do not support transparency, there's nothing we can do about it. PS level 3 however supports gradients, and the CVS version of Inkscape exports gradients (without transparency) correctly to PS or EPS.
Ah. Thanks for correcting my ignorance about PS and EPS and for pointing me the latest CVS version.
PNG format does not have any layers. As for gradients, they were always exported correctly to PNG from Inkscape. What is the problem with that?
You are correct. I was confusing myself by putting PNGs into float-figures in LaTeX and the rendering of that to DVI gets rid of the gradients. To satisfy myself about Inkscape's PNG gradient support I created a simple linear gradient box, exported as PNG and viewed it in a HTML page. Perfect. ( I was also confusing the idea of "layers" within inkscape with the idea of layers in an image format.)
and the layering correct with PDF exports (but not the gradient, even if I choose the Acrobat-5.0 compatibility)
Try EPS export from Inkscape CVS and then ps2pdf from Ghostscript or Adobe Distiller. Gradients should work (but, again, without transparency).
I'll give that a go. Thanks for the help Bulia, Oisin
On Mon, 7 Mar 2005 16:07:45 -0400, bulia byak <buliabyak@...155...> wrote:
[snip]
the CVS version of Inkscape exports gradients (without transparency) correctly to PS or EPS.
I downloaded CVS head on March 7th and used the new gradient tool to create a box with a radial colored gradient fill. I exported this as a PNG and also saved it as an EPS. I inserted the resulting graphics as floating figures in Lyx.
The PNG displayed perfectly within LyX, the EPS displayed a solid fill instead of a gradient.
Exporting both of these as PDFs from LyX the final document showed both to have a solid fill instead of a gradient.
The new gradient tool itself is very intuitive and easy to use and showed no obvious defects during this brief test.
Oisin.
On Tue, 8 Mar 2005 18:25:04 -0800, oisin feeley <ofeeley@...155...> wrote:
On Mon, 7 Mar 2005 16:07:45 -0400, bulia byak <buliabyak@...155...> wrote:
The PNG displayed perfectly within LyX, the EPS displayed a solid fill instead of a gradient.
It may be that LyX is unable to display it because it's a PS level 3 feature. Try a recent Ghostscript or Adobe Distiller/Reader.
On Tue, 8 Mar 2005 22:29:52 -0400, bulia byak <buliabyak@...155...> wrote:
On Tue, 8 Mar 2005 18:25:04 -0800, oisin feeley <ofeeley@...155...> wrote:
On Mon, 7 Mar 2005 16:07:45 -0400, bulia byak <buliabyak@...155...> wrote:
The PNG displayed perfectly within LyX, the EPS displayed a solid fill instead of a gradient.
It may be that LyX is unable to display it because it's a PS level 3 feature. Try a recent Ghostscript or Adobe Distiller/Reader.
Hmm I had a look at this more systematically. I created a two types of filled rectangles. One of them was radial-gradient filled with a single colour (red). The other was radial-gradient filled with two colours (I filled with red first then edited in a new blue stop. I didn't really know what I was doing there). I then saved the results as PNG, PS and EPS. (So I had 6 total resulting files).
I then inserted these into a LyX (LaTeX) document as Graphics in Figure-Floats and exported that as a PDF. The following table shows the results (note that the LyX is viewing the raw LaTeX and images, whereas the gsview and acroread are working on the PDF exported from LyX):
Program: LyX gsview acroread
2-color PNG T T T 2-color PS T T T 2-color EPS T T T 1-color PNG T F F 1-color EPS F F F 1-color PS F F F
It should be added to these results that there was a thick-dashed, grey border around the rectangle and only Acrobat Reader rendered this clearly in the results and it did it differently for the 1-color and 2-color cases with the 2-color one appearing much thicker.
I've been using gsview-4.6-8 (which is a front end to ghostscript-7.07-33) and Acrobat Reader 5.0 for these test.
It looks as though there's still something interesting going on with gradient fills?
Hope this is useful, Oisin
On Tue, 8 Mar 2005 19:15:26 -0800, oisin feeley <ofeeley@...155...> wrote:
Hmm I had a look at this more systematically. I created a two types of filled rectangles. One of them was radial-gradient filled with a single colour (red).
What do you mean by "gradient filled by a single color"? The color going from opaque to transparent? But as I wrote, this is not going to work because PS does not support transparency. So it looks like solid red. Try a gradient from red to white without transparency, that will work.
On Tue, 8 Mar 2005 23:22:56 -0400, bulia byak <buliabyak@...155...> wrote:
On Tue, 8 Mar 2005 19:15:26 -0800, oisin feeley <ofeeley@...155...> wrote:
Hmm I had a look at this more systematically. I created a two types of filled rectangles. One of them was radial-gradient filled with a single colour (red).
What do you mean by "gradient filled by a single color"? The color going from opaque to transparent? But as I wrote, this is not going to work because PS does not support transparency. So it looks like solid red. Try a gradient from red to white without transparency, that will work.
Just as I went to check this reply I realized that this was probably the answer. Sorry for being so dim-witted Bulia and thanks for being patient with me. I just checked into doing it exactly that way: fill with a gradient, then "add a stop" and choose white for the new stop.
Obviously in my not-too-clever fumblings I was producing _transparent_ images whenever I just filled using a single stop.
Thanks for helping me sort this out. (And just for the record I also tested xpdf, gpdf with the same results as above. I'm assuming they all share some library, but I thought I'd test just to complete it. I didn't test evince as it depends on a whole load of gtk-2.6 stuff).
Oisin.
participants (2)
-
bulia byak
-
oisin feeley