Am Freitag, 20. Februar 2004 17:25 schrieb jorgen johansson:
> Hello,
> 
> I have got latex2html 2002-2-1 (1.71) up and running together with lyx 
> 1.3.3 (native qt version under windows XP).
> 
> I have some photos in .jpg format that I'd rather keep in that format 
> for the html version of my document. But l2h converts it to .gif or .png 
>   (depending on the settings l2hconf.pm).

Because latex2html does not know that they were available as .jpg, it only 
sees the .eps file references in the .tex file.

Please file this as an enhancement request on http://bugzilla.lyx.org to 
make sure that it does not get forgotten.

> Is there another way of forcing l2h not to convert latex created eps 
> files and directly use the jpg file in the Lyx graphics include?

You could use the attached external template (untested) instead of using the 
graphics include. Another option is to write a little script that converts 
the .tex file in the way you have done it by hand before feeding it to 
latex2html and use that script as html exporter instead of latex2html.


Georg
Template HtmlImage
        GuiName "[Bitmap for HTML: $$FName]"
        HelpText
                A bitmap file that is used as is for HTML export
                via latex2html.
                In the parameters box, you can provide optional
                parameters for the ImageMagick convert program.
                E.g., use `-border 10x10 -bordercolor black'
                to surround the picture with a black border 
                when you export to LaTeX.
                When you export to Ascii, you can provide a
                number describing how many columns the picture
                should expand to.
                This template uses Gimp for editing, and 
                ImageMagick to do conversions. It requires 
                Python for exporting to Ascii and DocBook, 
                and gifscii for exporting to Ascii.
        HelpTextEnd
        FileFilter "*.(gif|png|jpg)"
        ViewCommand "display $$Basename.eps"
        EditCommand "gimp $$FName"
        AutomaticProduction true
        Format LaTeX
                Product 
"\\htmladdimg{$$FName}\\begin{latexonly}\\includegraphics{$$Basename.eps}\\end{latexonly}"
                UpdateCommand "convert $$Parameters $$FName $$Basename.eps"
                UpdateResult "$$Basename.eps"
                Requirement "graphicx"
        FormatEnd
        Format Ascii
                Product "$$Contents(\"$$Basename.asc\")"
                UpdateCommand "python $$Sysdir/scripts/pic2ascii.py $$FName 
$$Parameters"
                UpdateResult "$$Basename.asc"
        FormatEnd
        Format DocBook
                Product "<graphic fileref=\"$$Basename.eps\"></graphic>"
                UpdateCommand "python $$Sysdir/scripts/pic2png_eps.py $$FName 
$$Parameters"
                UpdateResult "$$Basename.eps"
        FormatEnd
        Format LinuxDoc
                Product "[Bitmap: $$FName]"
        FormatEnd
TemplateEnd

Reply via email to