[OS X TeX] Re: htlatex not producing png

Michael Stiber stiber at u.washington.edu
Wed Sep 28 22:12:15 CEST 2005


On Sep 27, 2005, at 5:00 PM, T Jens Nöckel wrote:

>
> On Sep 26, 2005, at 8:08 PM, Michael Stiber wrote:
>
>> I've a machine with newly installed TeX et al. with i-Installer. The
>> setup works fine, _except_ that htlatex doesn't convert eps figures to
>> png. It gets the bounding boxes from the eps files (I can see the
>> width and height in the html file), but it doesn't actually run gs to
>> produce the png files. I _can_ generate the png files by running gs by
>> hand, using the bounding box information from the html. I just
>> re-installed TeX, thinking that perhaps I needed to install it after
>> ghostscript and ImageMagick, but still no dice. How can I get this to
>> work?
> Hi Michael,
>
> when you run tex4ht, do you actually in the log or the terminal output
> see that the conversion program tries to run ghostscript? Is it a
> command starting with gs -sDEVICE=pngalpha ...? Or is your script
> perhaps trying to invoke netpbm or convert but fails?

It doesn't try to run gs (personally, I don't care which way the files 
are generated, assuming they are of equal quality). The .log file has:

l. 593 Writing syllabus.idv[1] (syllabus0x.png)
File: structure-chart.eps Graphic file (type eps)
<structure-chart.eps> [9] [10]
l. 662 Writing syllabus.idv[2] (syllabus1x.png)
File: basic-class.eps Graphic file (type eps)
<basic-class.eps> [11] [12] [13] (./syllabus.aux) )

The .lg file has:

--- needs --- syllabus.idv[2] ==> syllabus0x.png ---
--- needs --- syllabus.idv[4] ==> syllabus1x.png ---


The section of tex4ht.env looks like:

<default>
  G.png
  Gdvips -E -q -Ppdf -f %%1 -pp %%2 > zz%%4.ps
  Ggs -sDEVICE=pngalpha -sOutputFile=%%3 -r110x110 -dEPSCrop 
-dBackgroundColor=16#ffffff -dTextAlphaBits=2 -dGraphicsAlphaBits=2 -q 
-dbatch -dNOPAUSE zz%%4.ps -c quit
Gdvips -Ppdf -mode ibmvga -D 110 -f %%1 -pp %%2 > zz%%4.eps
Gpstoedit -f svg zz%%4.eps %%3
%-------------------%
   Gdvips -Ppdf -mode ibmvga -D 110 -f %%1 -pp %%2 > zz%%4.ps
   Ggs -sDEVICE=ppm -sOutputFile=zz%%4.ppm -r110x110 -dTextAlphaBits=2 
-dGraphicsAlphaBits=2 -q -dbatch -dNOPAUSE zz%%4.ps -c quit0x110 
-transparent '#FFFFFF' zz%%4.png png2svgGDI.pl zz%%4.png
   Gperl svgGDI.pl zz%%4.svg %%3
   Grm zz%%4.ps
   Grm zz%%4.ppm
   Grm zz%%4.png
   Grm zz%%4.svg
G.
Gdvips -E -Ppdf -mode ibmvga -D 110 -f %%1 -pp %%2  > zz%%4.ps
Gconvert zz%%4.ps -trim +repage -density 110x110 -transparent '#FFFFFF' 
%%3
Grm zz%%4.ps
%--------- alternative instructions for old versions of convert
% Gconvert zz%%4.ps -trim -density 110x110 -transparent "#FFFFFF" %%3
% Gconvert zz%%4.ps -crop 0x0 +repage -density 110x110 -transparent 
"#FFFFFF" %%3
  Gconvert zz%%4.ps -crop 0x0 +page -density 110x110 -transparent 
"#FFFFFF" %%3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   </default>

Note that this is the file in 
/usr/local/teTeX/share/texmf.local/tex4ht/base/tex4ht.env. There are 
also files 
/usr/local/teTeX/share/texmf.local/tex4ht/base/unix/tex4ht.env and 
/usr/local/teTeX/share/texmf.local/tex4ht/base/win32/tex4ht.env, which 
are different. However, the file directly in the "base" directory is 
the one mentioned in the output to the terminal.

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list