On Wed, Jun 27, 2001 at 10:33:59AM +0200, Olivier Tubach wrote:
> I want to write the documentation of a in house application, and be able
> to produce PDF, Html and print copies. Our documentation will include a
> lot of color snapshots.
 
> The only weakness I see (after several hours trying lyx -I'm using
> 1.1.6fix2) is about images. You can import .eps files, but a 20K PNG
> file turns into a 1MB eps file.

Yep.

> Recently (1.1.16fix2?), you can import images ("Insert...  External
> Material...  Click on ChessDiagram to change the template to
> RasterImage, choose your {jpeg|gif|png...} image (how about a button on
> the main toolbar, or a keyboard shortcut, or an item in the Insert menu
> "Insert bitmap" ?).
> But you can't see it in lyx

Yep.

> How can I see a preview of my images in Lyx (I've a lot of them) ?
 
> What are the best image format ? We want to have small image files ( gif
> :(   jpeg png  (we've also our application's icons in xpm format, can we
> use them 'as it' ? seem that the export to html produces for all the
> icons.xpm a file  ".png" (no filename, only an extention))

Well, I haven't really done much HTML export from LyX, but I have
done PDF which has similar problems with size and EPS files.

For PDF, if one uses pdflatex, and keeps two copies of the image file,
one in PNG or JPEG (the master image), and the other one in EPS (a
conversion), then you can use the EPS file to have a preview in LyX, and
the PNG/JPG file in the PDF file.  The way you do it is, when specifying
the file name, don't put the extentsion on it -- that is, if the picture
was "pic1.eps" (with another file "pic1.png"), then just put "pic1".
LyX will then display the EPS file, but pdflatex will use the "pic1.png"
file.

Regarding conversions to EPS...

1) I found that using the ImageMagic convert program to produce EPS
files from PNG files does, indeed, make very big files.
However, if I use Save As.. EPS from Gimp, I get smaller files.
They are still noticeably bigger than the PNG files, though.

2) There is a program on CTAN <http://www.ctan.org> called jpeg2ps,
which takes advantage of Level2 postscript stuff to produce much smaller
EPS files (apparently Level 2 postscript knows about JPEG compression).
This of course only works on jpeg files.  The EPS files are still bigger
than the original jpeg files, but not by a huge amount.

> It's very important for us to produce html (and lyx's export is nice :)
> that uses the image we provide (jpeg or png), to avoir conversions,
> dithering etc...
> The PS or PDF export can convert the images, it's less important for us.

I haven't used the HTML conversion stuff... but it could well be that
the reason latex2html creates its own images is that one could
concievably do transformations (like resizes and rotations and
reflection) of included graphics files, with LaTeX, which things like PS
and PDF can cope with, but of course HTML doesn't know anything about
that -- so it's "safer" for latex2html to apply any transformations
itself and create the resultant image... and if it's going to do that
for transformed images, it is simpler to do it for all images.

That's my guess, anyway.  I have no idea what latex2html actually does.
 
> PS: I would be glad to receive advices about large, full of images and
> links documents: sould I split it in several .lyx files ?

I seem to recall that the HTML export doesn't deal very well with
included files, I think it just ignores them.  8-(

> About the html export, is it possible to produce a different html file
> for each part of my lyx document ?

Yes, I believe there's an option to latex2html, if you run it from the
command line; that is, export the LyX document as LaTeX, and run
latex2html over the exported .tex file.

(Yes, I have been *thinking* about HTML export...)

Kathryn Andersen
-=-=-=-=-=-=-=-=-
When you wake up in the morning and nothing hurts, don't assume you're dead.
                        You could have leprosy.
        -- Kaijen, Observations
-- 
 _--_|\     | Kathryn Andersen          <[EMAIL PROTECTED]>
/      \    |   <http://www.katspace.com>
\_.--.*/    |   
      v     | #include "standard/disclaimer.h"
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |   -> Earth -> Sol -> Milky Way Galaxy -> Universe

Reply via email to