[l2h] graphicx, EPS and latex2html

Ross MOORE Ross MOORE <ross@ics.mq.edu.au>
Thu, 26 Aug 1999 08:36:41 +1000 (EST)


> On Wed, 25 Aug 1999 08:36:02 +1000 (EST), you wrote:
> >This should happen automatically, due to the \includegraphics command.
> 
> It does now. I had a disk crash last week and the new installation
> works as expected. I don't have a clue what was wrong with the old
> installation (which used to simply ignore EPS graphics).
> 
> Currently, my latex2html'ed documents have some problems with grey.
> Sometimes, grey is painted as white and sometimes, the pictures are
> printed _on_ grey. Any idea what might be going wrong here?

No, grey is never used instead of white.
It *is* used instead of transparent, or "no colour",
which can cause the effects that you observe.

If you  \usepackage{color}  and  \pagecolor{white}  then you will
get a white background, but for graphics that are constructed only
using text, the default background is a shade of grey.
The reason for this is to get a better result with anti-aliasing
around the edges of font-characters.

The variables to adjust are  $LATEX_COLOR  and  $WHITE_BACKGROUND .

The latter is also set using  -white  on the command-line,
but it affects only {figure} and unknown environments,
which are likely to have graphic elements imported from elsewhere.

Environments, such as inline-math or accents, or math-displays,
or {makeimage} or {xy} etc.  which are known to be constructed using
font glyphs, automatically load the {color} package and set the
$LATEX_COLOR as background *UNLESS* your document already specifies
(within the document preamble) that it is loading this package 
and setting a background color.

Since it is usual to have a transparent background, the grey should
disappear when viewed from a Web browser.
For images where this does *not* occur, you can try several things

 a. explicitly set a background color for your image (in whatever
    application it was created)
    --- do *not* assume that empty means white

 b. try using a \pagecolor{white} command within the environment
    (this may not work with LaTeX currently)
    
    \begin{figure}
    \begin{latexonly}
    \pagecolor{white}
    \end{latexonly}
    .... what you really want in your figure ...
    \end{figure}

 c.  If (b) doesn't work, then do it in stages:

    A.  process the whole document, so that eveything is perfect except
        for the background of some images. e.g. img23.gif  img37.gif etc.

    B.  delete those .gif files, and any .old versions;
        e.g.  rm <jobname>/img{23,37}.*

    C.  insert a line   \pagecolor{white}  in the preamble of your source
        document.

    D.  reprocess the whole document.

  Only the missing images will be recreated,
  now with the correct background color.

  With this technique, you can use multiple background colours;
  but you need a separate processing run for each colour,
  so plan carefully to avoid wasting time, and be sure to reload
  images from source (not from the browser cache) when viewing the results.


Hope this helps,

	Ross Moore





> 
> Greetings
> Marc
> 
> -- 
> -------------------------------------- !! No courtesy copies, please !! -----
> Marc Haber          |   " Questions are the         | Mailadresse im Header
> Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
> Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29