The necessary file pstoimg.bat is not being generated when I run
config.bat after setting paths in prefs.pm in the temporary installation
directory.
I do have latest ghostscript (8.14), MiKTeX (2.4.1545), and netpbm
(10.18.4) already installed along with ActiveState perl. I used the
correct paths to gswin32.exe and the netpbm bin directory, as I
specified in the following (on one line):
$prefs{'EXTRAPATH'} = 'D:\\WP\\gs\\gs8.14\\bin;D:\\Graphics\\NetPbm\\bin';
And perl.exe is on my path.
What do I do in order to get pstoimg.bat generated?
--
Murray Eisenberg mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
Here's the log from running latex2html's config.bat:
config.pl, Release 2002-2-1 (Revision 1.49)
Accompanies LaTeX2HTML, (C) 1999 GNU Public License.
checking for old config file (cfgcache.pm)... not found (ok)
checking for platform... MSWin32 (Windows 32 bit)
checking for D:\Language\ActiveState\Perl\bin\perl.exe...
D:\Language\ActiveState\Perl\bin\perl.exe
checking perl version... 5.008003
checking if perl supports some dbm... yes
checking if perl globbing works... yes
checking for tex... d:\WP\texmf\miktex\bin\\tex.exe
checking for latex... d:\WP\texmf\miktex\bin\\latex.exe
checking for initex... d:\WP\texmf\miktex\bin\\initex.exe
checking for kpsewhich... d:\WP\texmf\miktex\bin\\kpsewhich.exe
checking for kpsewhich syntax... ok (style=1)
checking for TeX include path... /Temp/Install/latex2html-2002-2-1\html
checking for mktexlsr... d:\WP\texmf\miktex\bin\\mktexlsr.exe
checking for dvips... d:\WP\texmf\miktex\bin\\dvips.exe
checking dvips version... 5.90a
checking if dvips supports the combination of -E and -i -S 1... yes
checking for html4-check... no
checking for gswin32c... d:\WP\gs\gs8.14\bin\gswin32c.exe
checking for ghostscript version... 8.14
checking for ghostscript portable bitmap device... pnmraw
checking for full color device for anti-aliasing... ppmraw
checking for ghostscript library and font paths... built-in paths are
correct
checking for pnmcrop... no
Warning: Will not be able to generate images due to above failure.
checking for pnmflip... no
Warning: You may need to rely on LaTeX to generate images with effects.
checking for ppmquant... no
checking for pnmfile... no
checking for pnmcat... no
Warning: You may need to rely on LaTeX to generate images with effects.
checking for pbmmake... no
Warning: You may need to rely on LaTeX to generate images with effects.
checking for ppmtogif... no
checking for ppm2gif... no
checking for pnmtopng... no
checking for pnm2png... no
checking for ppmtojpeg... no
Warning: You cannot directly translate/modify graphics of format.
checking for pnmcut... no
Warning: You may need to rely on LaTeX to generate images with effects.
checking for pnmpad... no
Warning: You may need to rely on LaTeX to generate images with effects.
checking for pnmrotate... no
Warning: You may need to rely on LaTeX to generate images with effects.
checking for pnmscale... no
Warning: You may need to rely on LaTeX to generate images with effects.
checking for giftopnm... no
Warning: You cannot directly translate/modify graphics of format.
checking for jpegtopnm... no
Warning: You cannot directly translate/modify graphics of format.
checking for pngtopnm... d:\WP\texmf\miktex\bin\\pngtopnm.exe
checking for tifftopnm... d:\WP\texmf\miktex\bin\\tifftopnm.exe
checking for picttoppm... no
Warning: You cannot directly translate/modify graphics of format.
checking for anytopnm... no
Warning: You cannot directly translate/modify graphics of format.
checking for bmptoppm... no
Warning: You cannot directly translate/modify graphics of format.
checking for pcxtoppm... d:\WP\texmf\miktex\bin\\pcxtoppm.exe
checking for sgitopnm... no
Warning: You cannot directly translate/modify graphics of format.
checking for xbmtopbm... no
Warning: You cannot directly translate/modify graphics of format.
checking for xwdtopnm... no
Warning: You cannot directly translate/modify graphics of format.
checking if multiple pipes work... no
Unfortunately multiple pipes are not reliable on this OS.
checking for temporary disk space... C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
creating cfgcache.pm
creating test.bat
creating install.bat
Note: Will install...
... executables to : D:\WP\TeXutils\L2H\bin
... shared library items to : D:\WP\TeXutils\L2H
... unshared library items to : D:\WP\TeXutils\L2H
>Some more information: I do have libpng installed.
>
>Here's the log from running latex2html's config.bat:
>
>checking for pnmcrop... no
>Warning: Will not be able to generate images due to above failure.
This would appear to be explanation enough.
>checking for pnmflip... no
>Warning: You may need to rely on LaTeX to generate images with effects.
>checking for ppmquant... no
>checking for pnmfile... no
etc.
It appears to be looking for the netpbm distribution. I don't know much
about latex2html, but most similar programs need either ImageMagik or
netpbm installed to handle images. Both can be downloaded
for free and a google search should reveal where to find them
for any given platform. I don't know if latex2html even supports
ImageMagik, but netpbm is smaller anyway.
Dan
--
Dan Luecking Department of Mathematical Sciences
University of Arkansas Fayetteville, Arkansas 72701
To reply by email, change Look-In-Sig to luecking
$prefs{'EXTRAPATH'} = 'D:\\WP\\gs\\gs8.14\\bin;D:\\Graphics\\NetPbm\\bin';
And the latter path IS where the netpbm .exe files are located.
Dan Luecking wrote:
> On Thu, 27 May 2004 03:26:57 GMT, Murray Eisenberg
> <mur...@math.umass.edu> wrote:
>
>
>>Some more information: I do have libpng installed.
>>
>>Here's the log from running latex2html's config.bat:
>>
>>checking for pnmcrop... no
>>Warning: Will not be able to generate images due to above failure.
>
>
> This would appear to be explanation enough.
>
>
>>checking for pnmflip... no
>>Warning: You may need to rely on LaTeX to generate images with effects.
>>checking for ppmquant... no
>>checking for pnmfile... no
>
> etc.
>
> It appears to be looking for the netpbm distribution. I don't know much
> about latex2html, but most similar programs need either ImageMagik or
> netpbm installed to handle images. Both can be downloaded
> for free and a google search should reveal where to find them
> for any given platform. I don't know if latex2html even supports
> ImageMagik, but netpbm is smaller anyway.
>But I DO have netpbm installed, and its bin subdirectory includes those
>various executables (pnmcrop.exe, etc.). And, as I said in my original
>posting, the LaTeX2html prefs.pm file DOES include the path to those
>executables:
>
>$prefs{'EXTRAPATH'} = 'D:\\WP\\gs\\gs8.14\\bin;D:\\Graphics\\NetPbm\\bin';
>
>And the latter path IS where the netpbm .exe files are located.
Is that directory in the windows PATH variable? If not the INSTALL file
says this:
"If you have just installed some of the required external utilities and
have not yet added the paths to the PATH environment, you may specify
the argument EXTRAPATH+... (e.g. EXTRAPATH+C:\tex\bin;C:\netpbm\bin) on
the CONFIG.* command line to indicate additional search paths."
And later in the FAQ section it says
"4. Q: I've installed the external programs, but the configure procedure
doesn't recognize that.
A: You either have not sufficient access rights or - more probably -
you need to add some paths to your PATH environment. You may do
that on the fly, i.e. set PATH manually and run the configure step
again. The absolute paths are saved, so that LaTeX2HTML will run
ok even if you don't have all the additional PATH settings coded
into your .profile, .bashrc, .(t)cshrc, AUTOEXEC.BAT, etc...
Finally there is the --with-extrapath=... configure option or
EXTRAPATH+... for CONFIG.BAT"
I read that as saying it is not enough (at the config step) to edit
prefs.pm. However, it is a little ambiguous.
If you do have the pbm utilities directory in your path, I don't have a
clue what could be going wrong.
The docs at http://www.mayer.dial.pipex.com/l2h.htm
certainly mislead me on that point, which I interpreted as saying that
editing prefs.pm sufficed to locate netpbm.
Thanks for your help on this point.
But I'm not out of the woods yet: When I run latex2html.bat, none of the
images are generated. More troubleshooting.
(But this is SO typical of just about any program I've ever tried to
install under Windows that was ported from a *nix platform. Nothing
beats the simplicity of a typical native Windows program, where
easy-to-undertand dialog boxes allow you to set all the options without
reading long documentation and searching config files for options to
edit, etc.)
Dan Luecking wrote:
--
Here's the output from running latex2html on the supplied l2htest.tex:
This is LaTeX2HTML Version 2002-2-1 (1.71)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Revised and extended by:
Marcus Hennecke, Ross Moore, Herb Swan and others
...producing markup for HTML version 3.2
Extension: loading D:\WP\TeXutils\L2H\versions\latin1.pl
HTML version: loading D:\WP\TeXutils\L2H\versions\html3_2.pl
*** processing declarations ***
OPENING E:\Temp\Install\latex2html-2002-2-1\tests\l2htest.tex
Cannot create directory l2htest\: File exists, reusing it.
Reusing directory l2htest\:
Note: Working directory is E:\Temp\Install\latex2html-2002-2-1\tests\l2htest
Note: Images will be generated in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420
Loading D:\WP\TeXutils\L2H\styles\texdefs.perl...
Package: loading D:\WP\TeXutils\L2H\styles\article.perl
Reading ...
++
@@@
Doing .\basic.tex
%%%
*** opening brace #27 is unmatched ***
preceding: \Large Large and {\bf boldface
*** opening brace #28 is unmatched ***
preceding: \bf boldface
Processing macros ...++
@@@@@@@@@@@@@@@@@@@@
Doing .\basicinc.tex
%%%
*** matching brace #28 found ***
*** matching brace #27 found ***
Processing macros ...++
@@@@@@@@@@@
Doing .\formulas.tex
%%
Processing macros ...++
@@@
Translating ...
0/6:top of l2htest: for l2htest.html
*** translating preamble ***
....
*** preamble done ***
;;.
1/6:section:.."Some basic stuff" for node1.html
;..;
2/6:subsection:..."Fonts" for node2.html
;.......................;..
3/6:subsection:..."Lists" for node3.html
;.,..,..;.
4/6:subsection:..."Table" for node4.html
;..,..;.
5/6:section:.."Mathematic formulas" for node5.html
;.,.,;..
6/6:sectionstar:.."About this document ..." for node6.html
;;.
Writing image file ...
This is e-TeX, Version 3.141592-2.1 (MiKTeX 2.4)
entering extended mode
(./images.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german,
ngerman, du
mylang, nohyphenation, loaded.
*** processing 2 images ***
Generating postscript images using dvips ...
Converting image #2
pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p3360.pnm >
img2.png" failed: Bad file descriptor
Error while converting image
Converting image #1
pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p2396.pnm >
img1.png" failed: Bad file descriptor
Error while converting image
Doing section links ................
Unknown commands: formulas basicinc
Done.
Murray Eisenberg wrote:
> Putting the path to netpbm\bin on my Windows system path did it!
> Executing config.bat now does complete without error and produces the
> pstoimg.bat file....
>
> But I'm not out of the woods yet: When I run latex2html.bat, none of the
> images are generated. More troubleshooting.
>Generating postscript images using dvips ...
>Converting image #2
>pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
>-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p3360.pnm >
>img2.png" failed: Bad file descriptor
If the file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p3360.pnm
actually exists, it may be that pnmtopng is confused by spaces in
filenames or by the shortfilename substitutes used.
Since this is a temporary file written to the system's TEMP
directory, you can test this hypothesis by setting the environmental
variable TEMP to point to a simple directory without spaces in its
name. I have a directory c:\tmp and have set TEMP equal to that.
But I get exactly the same "Converting image" error messages as before
(and the same 0 KB png's).
I have no idea from where the batch files, etc., are picking up the
destination c:\Documents\Local Settings\Temp for writing files.
I did look for recently changed files in the Netpbm directory, but there
were none; and the Windows Registry does not seem to have any key
related to Netpbm that sets the temporary file destination. But I have
no idea what is trying to do the writing: Ghostscript? Perl? ....?
Dan Luecking wrote:
> On Fri, 28 May 2004 17:56:50 GMT, Murray Eisenberg
> <mur...@math.umass.edu> wrote:
>
>
>>Generating postscript images using dvips ...
>>Converting image #2
>>pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
>>-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p3360.pnm >
>>img2.png" failed: Bad file descriptor
>
>
> If the file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p3360.pnm
> actually exists, it may be that pnmtopng is confused by spaces in
> filenames or by the shortfilename substitutes used.
>
> Since this is a temporary file written to the system's TEMP
> directory, you can test this hypothesis by setting the environmental
> variable TEMP to point to a simple directory without spaces in its
> name. I have a directory c:\tmp and have set TEMP equal to that.
>
>
> Dan
>
--
>I changed the System environment vars TEMP and TMP to point to (an
>actual directory) C:\tmp and the User vars TEMP and TMP to point there
>as well. And I ran config.bat again before trying latex2html.bat on
>l2htest.tex.
>
>But I get exactly the same "Converting image" error messages as before
>(and the same 0 KB png's).
>
>I have no idea from where the batch files, etc., are picking up the
>destination c:\Documents\Local Settings\Temp for writing files.
I take it you mean the changing the above environmental variables did
not change the message listing the above temp directory.
>I did look for recently changed files in the Netpbm directory, but there
>were none; and the Windows Registry does not seem to have any key
>related to Netpbm that sets the temporary file destination. But I have
>no idea what is trying to do the writing: Ghostscript? Perl? ....?
Most programs will query the system for the value of TEMP (my system
variable points to C:\Windows\Temp which seems to always be empty)
or look in the user's environment (mine points to C:\tmp). Other
possibilities might be HOME (I've set it to C:\home), but the
windows registry also provides HOMEPATH which is not listed in the
"Environmental Variables" dialogue, and which some programs might
perhaps use.
Finally, some programs might designate a TEMP directory at their
installation.
My experience is that the user's environment overrides the system's,
but that may depend on the program.
Converting image #2
pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
-trans gray85
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p3360.pnmimg2.png"
failed: Bad file descriptor
...despite having changed the user and system variables TEMP and TMP to
point to the same directory C:\tmp.
Dan Luecking wrote:
>
> I take it you mean the changing the above environmental variables did
> not change the message listing the above temp directory.
>
> On Sat, 29 May 2004 19:15:49 GMT, Murray Eisenberg
> <mur...@math.umass.edu> wrote:
>
>
>>I changed the System environment vars TEMP and TMP to point to (an
>>actual directory) C:\tmp and the User vars TEMP and TMP to point there
>>as well. And I ran config.bat again before trying latex2html.bat on
>>l2htest.tex.
>>
>>But I get exactly the same "Converting image" error messages as before
>>(and the same 0 KB png's).
>>
>>I have no idea from where the batch files, etc., are picking up the
>>destination c:\Documents\Local Settings\Temp for writing files.
--
In article <s95vc.39500$n_6.14171@attbi_s53>, mur...@math.umass.edu
says...
> Correct, I'm still seeing the same messages of form...
>
> Converting image #2
> pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
> -trans gray85
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h420\p3360.pnmimg2.png"
> failed: Bad file descriptor
>
--
Phil Viton
Ohio State University
======
*** processing 2 images ***
Generating postscript images using dvips ...
Converting image #2
pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h248\p1780.pnm >
img2.png" failed: Bad file descriptor
Error while converting image
Converting image #1
pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h248\p3892.pnm >
img1.png" failed: Bad file descriptor
Error while converting image
========
So the issue is somewhere else. The trouble is I don't understand
enough of the structure of all this to be able to pinpoint it.
I don't know whether the problem lies with the path shown abbreviated as
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
or whether the problem is that two different programs involved are
expecting different locations. So many programs are involved: Perl,
Ghostscript, netpbm, latex2html's own batch and other files. Perhaps if
I could read Perl I would have a good chance of figuring this out by
examining the latex2html scripts, but unfortunately I do not.
Philip A. Viton wrote:
--
>
>So the issue is somewhere else. The trouble is I don't understand
>enough of the structure of all this to be able to pinpoint it.
>
>I don't know whether the problem lies with the path shown abbreviated as
>
>C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
>
Did you try editing prefs.pm and/or config.pl and rerunning config?
At least we might be able to eliminate this as the source of the
problem.
I just installed latex2html. I set TEMP to a nice space-free path
and also edited prefs.pm to point to the same place. One of those
worked as config.bat picked it up just fine. Unfortunately, I got
the same error as you did.
But I worked out the cause: I checked the syntax of my pnmtopng
program and it permits the option -trans (for transparent), but
requires a particular syntax for the transparent color. See below.
>
>Generating postscript images using dvips ...
>Converting image #2
>pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
>-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h248\p1780.pnm >
gray85, translated to pnmtopng's required syntax is #D9D9D9. I edited
pstoimg.bat, changing the one instance of 'gray85' to '#D9D9D9' and
everything worked.
>img1.png" failed: Bad file descriptor
Apparently, an incorrect color parameter caused pnmtopng to interpret
gray85 as a file and aborted.
Perhaps latex2html is assuming the syntax of a different version of
pnmtopng. If you do the edit and everything works, you might want to
also edit pstoimg.pin so that it will be kept if you run config.bat
again. There may be a better way to make the patch and probably the
maintainers should be told about the problem.
>On Wed, 02 Jun 2004 16:40:19 GMT, Murray Eisenberg
><mur...@math.umass.edu> wrote:
>
>>pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
>>-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h248\p1780.pnm >
>
>gray85, translated to pnmtopng's required syntax is #D9D9D9. I edited
>pstoimg.bat, changing the one instance of 'gray85' to '#D9D9D9' and
>everything worked.
>
>>img1.png" failed: Bad file descriptor
>
>Apparently, an incorrect color parameter caused pnmtopng to interpret
>gray85 as a file and aborted.
>
>Perhaps latex2html is assuming the syntax of a different version of
>pnmtopng.
Indeed. The most recent version of netpbm I could find for windows
(10.18.4) accepts named colors as defined in rgb.txt, a file supplied
with latex2html. The best solution is probably to upgrade netpbm.
>On Wed, 02 Jun 2004 14:53:21 -0500, Dan Luecking <Look-...@uark.edu>
>wrote:
>
>>On Wed, 02 Jun 2004 16:40:19 GMT, Murray Eisenberg
>><mur...@math.umass.edu> wrote:
>>
>>>pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
>>>-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h248\p1780.pnm >
>>
>>gray85, translated to pnmtopng's required syntax is #D9D9D9. I edited
>>pstoimg.bat, changing the one instance of 'gray85' to '#D9D9D9' and
>>everything worked.
>>
>>>img1.png" failed: Bad file descriptor
>>
>>Apparently, an incorrect color parameter caused pnmtopng to interpret
>>gray85 as a file and aborted.
>>
>>Perhaps latex2html is assuming the syntax of a different version of
>>pnmtopng.
>
>Indeed. The most recent version of netpbm I could find for windows
>(10.18.4) accepts named colors as defined in rgb.txt, a file supplied
>with latex2html. The best solution is probably to upgrade netpbm.
Well I did that, and now test.bat produces a compile error (presumably
from perl: "Global symbol $PNMFILE requires explicit package name at
pstoimg.bat, line 1300"
This error disappeared after I edited prefs.pm to make 'pamfile'
a value for PNMFILE. I also, after consulting the NetPBM docs, made
'pnmtojpeg' the value for PPMTOJPEG. The test.bat program works now.
I hope the information helps. Do be sure to run config.bat after any
such changes.
Dan Luecking wrote:
> On Wed, 02 Jun 2004 14:53:21 -0500, Dan Luecking <Look-...@uark.edu>
> wrote:
>
>
>>On Wed, 02 Jun 2004 16:40:19 GMT, Murray Eisenberg
>><mur...@math.umass.edu> wrote:
>>
>>
>>>pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmtopng.exe -interlace
>>>-trans gray85 < C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h248\p1780.pnm >
>>
>>gray85, translated to pnmtopng's required syntax is #D9D9D9. I edited
>>pstoimg.bat, changing the one instance of 'gray85' to '#D9D9D9' and
>>everything worked.
>>
>>
>>>img1.png" failed: Bad file descriptor
>>
>>Apparently, an incorrect color parameter caused pnmtopng to interpret
>>gray85 as a file and aborted.
>>
>>Perhaps latex2html is assuming the syntax of a different version of
>>pnmtopng.
>
>
> Indeed. The most recent version of netpbm I could find for windows
> (10.18.4) accepts named colors as defined in rgb.txt, a file supplied
> with latex2html. The best solution is probably to upgrade netpbm.
>
>
> Dan
>
--
I made the two changes in prefs.pm you list -- and I forced
$prefs{'TMPSPACE'} = 'c:\tmp';
(which really should be unnecessary since that's already on the path set
up in prefs.pm for DOS/Windows). But I still have the same "Bad file
descriptor" as before.
Also, did you by any chance mistype "edited prefs.pm to make 'pamfile'
a value for PNMFILE." Did you mean that the value should be "pnmfile"?
Because it already was that. If you meant what you typed, is there
supposed to be some executable "pamfile"
Dan Luecking wrote:
--
>Now I'm lost: Should I be doing BOTH the change of color name from
>"gray85" to "#D9D9D9" AND the two changes you list below in prefs.pm?
>
No. Reread my posts:
BEFORE upgrading NetPBM one needs the hexadecimal numerical format for
the gray level. Make ONLY that change:
gray85 --> #D9D9D9
AFTER I upgraded NetPBM the name format for colors works OK and
the above change is not needed (but not harmful)
>I made the two changes in prefs.pm you list -- and I forced
This requires the upgrade, and may not work even there. In the NetPBM
package that I chose (the precompiled MinGW programs) the "program"
pnmfile (for example) seems to be intended to be a link to
pamfile.exe. What it actually is an exact copy of pamfile.exe, but
with different name and no .exe extension. Windows programs don't
recognize it as an executable program.
I have (since my last posting) decided that the correct thing to do
is leave prefs.pm unchanged in this respect and rename pnmfile to
pnmfile.exe (in case that program makes decisions based on the name
it is invoked by). My previous version of NetPBM had different programs
pnmfile.exe and pamfile.exe.
Similar problems occur with ppmtojpeg (a copy of pnmtojpeg.exe in
my new NetPBM). I have now renamed it to ppmtojpeg.exe.
>
>$prefs{'TMPSPACE'} = 'c:\tmp';
>
>(which really should be unnecessary since that's already on the path set
>up in prefs.pm for DOS/Windows). But I still have the same "Bad file
>descriptor" as before.
It is unnecessary. In fact, I don't think the funky TEMP pathname was
ever the problem. The problem was the program pnmtopng getting a
command line it couldn't deal with (the gray85 problem above).
You need to RERUN config.bat after making changes to prefs.pm. The
change to pstoimg.bat (gray85 --> #D9D9D9) should either be done to
pstoimg.pin BEFORE RERUNNING config.bat, or to pstoimg.bat AFTER ANY
RERUNNING OF CONFIG.BAT.
>
>Also, did you by any chance mistype "edited prefs.pm to make 'pamfile'
>a value for PNMFILE."
No.
> Did you mean that the value should be "pnmfile"?
No
> Because it already was that. If you meant what you typed, is there
>supposed to be some executable "pamfile"
Yes, such an executable is in my version of NetPBM. BUT see my
discussion above and I don't really have a clue whether I did the
right thing in either case. However it did enable the test to
succeed. If you DID NOT get the latest NetPBM, DO NOT make those
changes to PNMFILE and PPMTOJPEG
>I have already been using netpbm ver. 10.18.4 for Windows. (I
>downloaded that and installed it the same time I downloaded and began
>trying to install latex2html.)
>
Which version? I found 3 different compilations.
Did you read the manual page for pnmtopng (the program that was
giving the errors? What does it say about the format of colors for
the --transparent option?
Did you try the gray85 --> #D9D9D9 suggestion in pstoimg.bat?
At first, I thought, you said you did tried changing the transparent
option and that worked. But then you said you updated netpbm to 10.18.4
and that no longer worked; but you made the two edits in prefs.pm -- one
of which I asked you about, whether you had mistyped it in your post --
and then that worked.
Since I have been using netpbm 10.18.4 from the start, I was and am
uncertain as to which of the two types of changes to make:
(a) just the transparent option value,
and/or
(b) the two edits in prefs.pm, which according to your post were:
$prefs{'PNMFILE'} = 'pamfile'; <--- typo here ????
and
$prefs{'PPMTOJPEG'} = 'pnmtojpeg';
As to which compilation of netpbm ver. 10.18.4 for Windows I'm using,
it's the one pointed to by
http://www.mayer.dial.pipex.com/l2h.htm
namely, at http://gnuwin32.sourceforge.net/packages/netpbm.htm.
I chose the Setup program there, which is:
netpbm-10.18.4-bin.exe
That's all the information I know how to find on which compilation I have.
As to what the pnmtopng docs say about the format for colors. There are
no man pages with actual content here: each file, such as pnmtopng.1 in
the man1 directory simply say to look at a corresponding html page.
Second, that html page, NetPbm/man/html/pnmtopng.html, says:
-transparent color
pnmtopng marks the specified color as transparent in the
PNG image.
You specify the color as in ppmmake.E.g. red or rgb:ff/00/0d.
If the color you specify is not present in the image,
pnmtopng selects instead the color in the image that is closest
to the one you specify.
Well I don't seem to have any file ppmmake -- just ppmmake.exe and docs
for that. In ppmmkae.html, the only thing I can ferret out is the
following examples:
ppmmake red 50 50
ppmmake rgb:ff/80/80 50 100 -maxval=5
So I cannot tell from that whether "gray85" is legitimate. And if not,
your suggested change to #D9D9D9 does not seem to fit with the format there.
So I am at sea as to how to proceed. (I just want to get latex2html
working and then use it! This seems to be turning into an utter nightmare.)
Dan Luecking wrote:
> On Thu, 03 Jun 2004 02:38:07 GMT, Murray Eisenberg
> <mur...@math.umass.edu> wrote:
>
>
>>I have already been using netpbm ver. 10.18.4 for Windows. (I
>>downloaded that and installed it the same time I downloaded and began
>>trying to install latex2html.)
>>
>
>
> Which version? I found 3 different compilations.
>
> Did you read the manual page for pnmtopng (the program that was
> giving the errors? What does it say about the format of colors for
> the --transparent option?
>
> Did you try the gray85 --> #D9D9D9 suggestion in pstoimg.bat?
>
>
> Dan
>
--
>As I said, I'm confused ("bewildered" might be a better word).
Ok. Now I know what version of NetPBM you have and it is the same as
mine. Also I have to take back some of what I said: I tried deleting
and reinstalling both latex2html and netpbm and the error I thought
went away came back. Aparently, I did something I can't remember doing.
Anyway, the following finally worked for me:
(I deleted all of latex2html and restored it from the archive.
Same with netpbm. You don't necessarily need to do these, but
I had made a bunch of changes and wanted to start from scratch.)
*********************************************************************
Then:
- I changed 'gray85' to '#D9D9D9' on or about line 1511 in pstoimg.pin
- I edited prefs.pm. I changed only EXTRAPATH and PREFIX.
- I renamed the netpbm file pnmfile to pnmfile.exe
- I made sure the netpbm files were in my PATH variable
- I ran config.bat
- I ran test.bat
*********************************************************************
That worked here. (I don't understand why the change to gray85 is
necessary. It seemed unnecessary at one point, but now I can't get
things to work without it.)
As to your confusion: I hope the above is clear enough.
You might also want the following:
In the version of netpbm we both have, the following are actually
executable programs, but do not have the .exe extension. I renamed
them all, adding the .exe extension:
bmptoppm, gemtopbm, pgmedge, pgmnorm, pgmoil, pgmslice,
pnmarith, pnmfile, pnminterp, pnmnoraw, ppmnorm, ppmtojpeg,
and ppmtouil
The following are perl scripts. I added the .pl extension to them:
manweb, pnmflip, pnmquant, ppmfade, ppmrainbow, and ppmshadow
The following are shell scripts, requiring some incarnation of
sh to interpret:
anytopnm, hpcdtoppm, pamstretch-gen, pcdovtoppm, pnmindex,
pnmmargin, ppmquantall, and ppmtomap
If you run latex2html inside a sh shell, you may not need to do
any renaming.
Thank you so much for troubleshooting this. And for your patience with
me. As you could discern, I'm a newbie with Netpbm and latex2html who
didn't have much of a clue how to fix this, so I appreciate your
patience with me and the explicitness of this fix. (When I give help in
areas of my own experience or expertise, I always try to do the same.)
Murray
Dan Luecking wrote:
> On Thu, 03 Jun 2004 17:41:38 GMT, Murray Eisenberg
> <mur...@math.umass.edu> wrote:
>
> ... the following finally worked for me:
>
> (I deleted all of latex2html and restored it from the archive.
> Same with netpbm. You don't necessarily need to do these, but
> I had made a bunch of changes and wanted to start from scratch.)
> *********************************************************************
> Then:
> - I changed 'gray85' to '#D9D9D9' on or about line 1511 in pstoimg.pin
> - I edited prefs.pm. I changed only EXTRAPATH and PREFIX.
> - I renamed the netpbm file pnmfile to pnmfile.exe
> - I made sure the netpbm files were in my PATH variable
> - I ran config.bat
> - I ran test.bat
> *********************************************************************
> That worked here. (I don't understand why the change to gray85 is
> necessary. It seemed unnecessary at one point, but now I can't get
> things to work without it.)....
>
> You might also want the following:
>
> In the version of netpbm we both have, the following are actually
> executable programs, but do not have the .exe extension. I renamed
> them all, adding the .exe extension:
>
> bmptoppm, gemtopbm, pgmedge, pgmnorm, pgmoil, pgmslice,
> pnmarith, pnmfile, pnminterp, pnmnoraw, ppmnorm, ppmtojpeg,
> and ppmtouil
>
> The following are perl scripts. I added the .pl extension to them:
>
> manweb, pnmflip, pnmquant, ppmfade, ppmrainbow, and ppmshadow
>
> The following are shell scripts, requiring some incarnation of
> sh to interpret:
>
> anytopnm, hpcdtoppm, pamstretch-gen, pcdovtoppm, pnmindex,
> pnmmargin, ppmquantall, and ppmtomap
>
> If you run latex2html inside a sh shell, you may not need to do
> any renaming.
--
After successfully testing with test.bat, I ran install.bat. But now:
(a) In the html files generated from latex2html l2htest.tex (and other
files), after each in-line math and each displayed math I see a spurious:
mathend000#
(b) I tried latex2html'ing the distributed latex2html doc file
manual.tex. The result is quite a disaster; see my results at:
http://www.math.umass.edu/~murray/manual/
What's happening is:
- The math is not displaying: blank or a few (wrong?) characters, with
the same "mathend000#" as above in some;
- Some (all?) of the ps files from the TeXutils\L2H\docs\psfiles are
not being converted for insertion;
- During processing by latex2html, I gets lots of unexpected error
messages, including the several I list below. You can see all of them
in the context of the output from the latex2html command as redirected
to a file, at:
http://www.math.umass.edu/~murray/manual/manuallog.txt
Here are the most prominent of the error messages:
(0)
Warning: No implementation found for option 'dvips' found for 'article'
package.
(1)
Converting image #20
pstoimg.bat: Error: "D:\Graphics\NetPbm\bin\pnmcrop.exe -verbose <
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h612\p3952.pnm >
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h612\p3952.t00" failed:
Error while converting image: No such file or directory
Error: Cannot read 'img20.png': No such file or directory
(2)
*********** WARNINGS ***********
No implementation found for style `graphicx'
No implementation found for style `l2hman'
[Well, l2hman.sty was in the directory with manual.tex. but just to be
sure, I copied it into localtexmf and refreshed MiKTeX's database of
files. And certainly graphicx was already available and appears in the
MiKTeX database of files.]
(3)
Unknown math command: \smiley , image needed.
couldn't convert character Adot into available encodings
...set $ACCENT_IMAGES to get an image
(3)
Failed to convert image
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\l2h612\image020.ps
[Is this due to error #1, above?]