claudio wrote:

>       Hello, I'm writihg my thesis with Lyx, but I get a problem: I need to
>       produce images with StarOffice ( they come out as results of a Starcalc
>       sheet) and to include in the LyX file I can make tho things :
>       1) export directly in ps, but it's too large ( 3Mb)
>       2) save in tiff (200-300 Kb) and use tiff2ps but the ps is too large (
>       3Mb)
>
>       Is possible to reduce the size of the files ps I have with some
>       compression tool ?
>
>       Thanks , Claudio
>

You can gzip the PS (or better EPS) files. This makes you save quite
a lot of megs. But you need to extract the bounding box information
first and put it into a separate file. This leaves you with one
image.eps.gz and one image.eps.bb file.
LaTeX and xdvi should be able to deal with these compressed images
automagically.
Unfortunately, LyX is not yet able to display them. But you can
still use them without problems, you simply need to turn display off
in the figure popup and change the name of your image from image.eps
to image.eps.gz in that same popup.

Below is a little script that can do the trick on hopefully any PS
and EPS file.

-------------- >8   snip   8< -----------
#!/bin/csh -f
# eps2epsgz script
if ($#argv < 1) then
  echo "usage: eps2epsgz filename[s]"
  echo ""
  echo "eps2epsgz extracts bounding box information from given eps
files"
  echo "          and compresses the files afterwards via gzip"
  exit
endif
foreach hfile ( ${argv} )
  grep '%%BoundingBox' $hfile > $hfile.bb
  gzip $hfile
end
-------------- >8   snip   8< -----------

Hope this helps
Ralf

Reply via email to