[l2h] PNG transparency again

Igor Peshansky pechtcha at cs.nyu.edu
Mon Jan 30 20:08:16 CET 2006

On Mon, 30 Jan 2006, Jean-Pierre Chretien wrote:

> I know this has been discussed already, but I really don't understand
> what controls image transparency.

AFAIU, latex2html searches for a particular string in the resulting
PostScript file.  Some dvips drivers produce a slightly different string,
and latex2html doesn't find it.

I use the following script to fix up the PostScript file before launching
the pstoimg command:

-------- BEGIN .pstoimg.sh --------
# Get last argument
for i in "$@"; do
/usr/bin/env perl -pi -e 's/(?=\d+ \d+ bop gsave \d*\.\d+ TeXcolorgray clippath fill grestore)/\n/' "$PSFILE"
exec "$@"
--------- END .pstoimg.sh ---------

(the perl command is all on one line -- make sure it didn't wrap).
Put it in the source directory, and add the following to .latex2html-init
to enable it:

$PSTOIMG="$ENV{PWD}/.pstoimg.sh $PSTOIMG" unless $PSTOIMG=~/\.pstoimg\.sh/;

> Netpbm-10.3 here, could this be the problem (current is 10.23).
> Moreover, display my_document-ing14.png shows a chessboard of grays, but
> the Firefox display is OK. (ImageMagick 6.2.6)

Could it be that "display" uses the checkerboard pattern to indicate
transparency?  Many other programs do...

> Any clue since we discussed this ?

      |\      _,,,---,,_	    pechtcha at cs.nyu.edu | igor at watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

More information about the latex2html mailing list