Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with htlatex and equations

38 views
Skip to first unread message

are...@gmail.com

unread,
Jun 17, 2006, 6:19:11 AM6/17/06
to
Hello everyone,

I exported my PhD thesis LyX file to html by exporting from LyX to
latex and then running htlatex, bibtex'ing each aux file corresponding
to each bib file included (I have sectioned bibliography, i.e. I'm
using bibtopic in LyX, I guess).

Now I have problem with equations. equations in the object html
document don't show as figures but rather as:

( )T G(x,y) = ∂I, ∂I ∂x ∂y ------
in Firefox


(2.1)
---- in MS internet explorer

I think it is a mix of misinterpreted figure and text...

I had a look on various discussion groups but couldn't find any problem
report like this. Have any hint on this? What kind of information is
needed to detect the problem source?

Thanks for your support,
Diego

Eitan Gurari

unread,
Jun 17, 2006, 1:54:42 PM6/17/06
to

> > >Now I have problem with equations. equations in the object html
> > >document don't show as figures but rather as:

> > Looks like the figures where not generated so the browser resorts to
> > show the ALT field of the figures. The messages produced during the
> > compilation trace the generation of the figures with comments similar
> > to the following system call and system return notices.
> >
> > ----------------------------
> > t4ht.c (2006-01-04-02:35)
> > ....
> > System call: /usr/local/magick-6.2.4-6/bin/convert -trim +repage
> > -density 110x110 -transparent '#FFFFFF' zzfoo.ps foo0x.png
> > System return: 0

> No figure is generated from equations (I looked for them on my entire
> disk) and I get error messages like the one you reported (see attached
> file).
> Actually I also get error messages from LyX (did I tell you the source
> tex file is generated by LyX?) about "converter from PNG to EPS not
> found" (not exact quote) when I export from lyx to latex.

> ----------------------------
> t4ht.c (2004-04-21-00:17 Windows MiKTeX)
> t4ht master
> -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env

> System call: dvips -E -Ppdf -mode ibmvga -D 110 -f master.idv -pp 1 > zzmaster.ps
....
> System return: 0
> System call: convert -trim +repage -density 110x110 -transparent '#FFFFFF' zzmaster.ps master0x.png
> Parametro non valido - +repage
> --- Warning --- System return: 4

Try upgrading the ImageMagic/convert utility to a more recent version, or modify
the G-script <convert>...</convert> at

c:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env

for the version of convert in use. See the segment <convert>...</convert> at

http://www.cse.ohio-state.edu/~gurari/TeX4ht/tex4ht-env-win32.txt

and the variants that follow for calling convert.

I'm not familiar with the Lyx exporting mechanism. However, as far as tex4ht
is concerned, a PNG output mode is fine.

-eitan

are...@gmail.com

unread,
Jun 17, 2006, 9:39:41 PM6/17/06
to

I tried both updating ImageMagick to the last version and modifying the
script, but it didn't work.
Regarding the script file, the only difference I found in the segment
you refer to is this line:

Ggswin32c -sDEVICE=pngalpha -sOutputFile=%%3 -r110x110 -dEPSCrop
-dBackgroundColor=16#ffffff -dTextAlphaBits=2 -dGraphicsAlphaBits=2 -q
-dbatch -dNOPAUSE zz%%4.ps -c quit

being on the file on my system:

Gmgs ... (same as above)

but, honestly speaking, all this have little meaning to me!

Diego

Eitan Gurari

unread,
Jun 18, 2006, 1:58:01 AM6/18/06
to
>I tried both updating ImageMagick to the last version and modifying the
>script, but it didn't work.

What kind of messages t4ht.c issues?

>Regarding the script file, the only difference I found in the segment
>you refer to is this line:
>
> Ggswin32c -sDEVICE=pngalpha -sOutputFile=%%3 -r110x110 -dEPSCrop
>-dBackgroundColor=16#ffffff -dTextAlphaBits=2 -dGraphicsAlphaBits=2 -q
>-dbatch -dNOPAUSE zz%%4.ps -c quit

The above line is ignored since it is preceded by a space. The only
records of tex4ht.env taking part in the conversions are

Gif exist zz%%4.ps DEL zz%%4.ps >nul
Gif exist %%3 DEL %%3 >nul
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
Gif exist zz%%4.ps DEL zz%%4.ps >nul

The problem resulted from the `convert' record.

System call: dvips -E -Ppdf -mode ibmvga -D 110 -f master.idv -pp 2 > zzmaster.ps
...
System return: 0
System call: convert -trim +repage ...


Parametro non valido - +repage
--- Warning --- System return: 4

The complain is about an unrecognized `+repage' argument. If you
type the `convert' command without arguments it will show its version
and list the recognized options.

The page

http://www.cse.ohio-state.edu/~gurari/TeX4ht/tex4ht-env-win32.txt

suggests the following substitutions 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

The second case will not apply as it assumes the unrecognized +repage option.

-eitan

are...@gmail.com

unread,
Jun 19, 2006, 10:00:07 AM6/19/06
to

I tried your suggestions and they didn't work...

I think there's a problem with convert.exe (not working properly on my
machines). I'll let you know asap.


Regards,
Diego

Eitan Gurari

unread,
Jun 19, 2006, 11:14:44 AM6/19/06
to

>> Gconvert zz%%4.ps -trim +repage -density 110x110 -transparent "#FFFFFF" %%3

>> 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

>I tried your suggestions and they didn't work...


>
>I think there's a problem with convert.exe (not working properly on my
>machines). I'll let you know asap.

Some machines have more than one utility named convert. Try mentioning
the full path in the command line. That is, have a reference to
convert similar to the following one.

Gc:\...\convert.exe zz%%4.ps ...

are...@gmail.com

unread,
Jun 19, 2006, 2:17:01 PM6/19/06
to

you're right (of course I didn't think that there's more than one
utility named convert on my machine...).

I tried

c:\...\convert foo.eps foo.jpg

with both versions 6.2.8-Q16 (dynamic DLL) and 6.2.7.2 (bundled in LyX
win installer) and I get respectively the following error messages

convert.exe: `%s': %s "gswin32c.exe" -q -dBATCH -dSAFER
-dMaxBitmap=500000000 -d
NOPAUSE -dAlignToPixels=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4
-dGraphicsAlphaBit
s=4 "-g565x525" "-r72x72"
"-sOutputFile=C:\DOCUME~1\admin\IMPOST~1\Temp\magick-
0onfdsfr" "-fC:\DOCUME~1\admin\IMPOST~1\Temp\magick-5d3tufki"
"-fC:\DOCUME~1\adm
in\IMPOST~1\Temp\magick-m803deee".
convert.exe: `%s': %s "gswin32c.exe" -q -dBATCH -dSAFER
-dMaxBitmap=500000000 -d
NOPAUSE -dAlignToPixels=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4
-dGraphicsAlphaBit
s=4 "-g565x525" "-r72x72"
"-sOutputFile=C:\DOCUME~1\admin\IMPOST~1\Temp\magick-
0onfdsfr" "-fC:\DOCUME~1\admin\IMPOST~1\Temp\magick-5d3tufki"
"-fC:\DOCUME~1\adm
in\IMPOST~1\Temp\magick-m803deee" -c showpage.
convert.exe: no decode delegate for this image format `something.eps'.
convert.exe: Postscript delegate failed `something.eps'.
convert.exe: missing an image filename `something.jpg'.

and

convert: no decode delegate for this image format `Abstract1.jpg'.
convert: missing an image filename `Abstract1.eps'.

I don't want to annoy you with matters not related to htlatex so tell
me when I have to stop!! I didn't try yet to talk with ImageMagick
people

Regards,
Diego

Eitan Gurari

unread,
Jun 19, 2006, 5:31:01 PM6/19/06
to

I'm not sufficiently familiar with the convert utility to address the
above configurations.

In case netpbm is present, you can try deactivating the
<convert>...</convert> script, and activating instead the
<netpbm>...</netpbm> script. The deactivation can be done by removing
the spaces preceding the <convert> tag and </convert> end tag. The
activation can be done by introducing spaces before the <netpbm> tag
and </netpbm> end tag.

-eitan

Eitan Gurari

unread,
Jun 19, 2006, 11:30:54 PM6/19/06
to

>I tried
>
>c:\...\convert foo.eps foo.jpg
>
>with both versions 6.2.8-Q16 (dynamic DLL) and 6.2.7.2 (bundled in LyX
>win installer) and I get respectively the following error messages

>convert: no decode delegate for this image format `Abstract1.jpg'.


>convert: missing an image filename `Abstract1.eps'.


The following posting was made on mac-tex by Herbert Schulz with respect to a
similar reported problem.

If you have a recent copy of ImageMagik you'll also need get the
libpng package.

There is still not sufficient feedback to determine whether the
suggestion in fact suffice to solve the problem. -eitan

are...@gmail.com

unread,
Jun 20, 2006, 3:27:28 PM6/20/06
to

> The following posting was made on mac-tex by Herbert Schulz with respect to a
> similar reported problem.
>
> If you have a recent copy of ImageMagik you'll also need get the
> libpng package.
>
> There is still not sufficient feedback to determine whether the
> suggestion in fact suffice to solve the problem. -eitan

I tried installing libpng and re-running htlatex but I get always the
same error.

I think the problem is with ImageMagick (convert utility), which cannot
find GhostScript executable or some related file as gs_init.ps.
ImageMagick in fact uses other programs (as GhostScript) to manage
different file type (as eps). these programs are called coder modules
and must reside in ImageMagick path.

I'm waiting for some feedback from ImageMagick user list on how to add
program directory to ImageMagick coder module search path.

This problem may also be related to the mess I made with multiple and
successive installation of GhostScript (and other programs) on windows.


Regards,
Diego

Stephen Harris

unread,
Jun 21, 2006, 11:59:06 AM6/21/06
to
are...@gmail.com wrote:

> This problem may also be related to the mess I made with multiple and
> successive installation of GhostScript (and other programs) on windows.
>
>
> Regards,
> Diego
>

Using Control Panel->Add/Remove to install and uninstall is good
practice because a well-behaved uninstaller will clear the registry.
I had a problem left over from using GS8.14 and then removing it.
There were some left over entries in the registry that caused a
problem. I had to manually delete them. More recent versions of
Ghostscript 8.51/->.53 do a decent job of uninstalling themselves.

Good luck,
Stephen

0 new messages