----- Original Message ----- From: "Ross Moore" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, December 17, 2002 11:11 PM Subject: Re: Re: [l2h] Why images cannot be generated?
> > > Dear Ross Moore, > > > > Thanks for your help. Stragely, it seems that config.bat have successfully find AFPL Ghostscript 8.00. The following is the segmented texts in config.log after running config.bat: > > > > ....... > > checking for gswin32c... C:\gs\gs8.00\bin\gswin32c.exe > > checking for ghostscript version... 8.00 > > ....... > > Hmm. > So it looks like it found that OK -- which is good. > That leaves me mystified about what else might be the problem. This looks like that same ol' problem with L2H on Windows that is mentioned here from time to time, the cause of which (AFAIK) has never been identified or resolved. At first, I had the same problem but I did something (?) and have not experienced it since, but I have subsequently replaced my drive and did a clean install w/ no problems. All I can offer is what I know to be a successful installation on an NT box (copied from an email to someone else some time ago.) Note particularly suggestion 4 and the rmarks that follow regarding netpbm. IIRC, one or the other (or both) is what cured the problem for me, and I was getting the exact errors you were. 1. Don't use the same temp folder as the operating system does. Make a new temp folder, \l2htemp or somesuch, for l2h's exclusive use. Modify prefs.pm accordingly. I am using drive F: $prefs{'TMPSPACE'} = 'F:\\l2htemp'; 2. Also in prefs.pm, make the target directory name l2h. From your log, it appears you have already made this mod: $prefs{'PREFIX'} = 'F:\\l2h'; 3. Find the local initialization file, dot.latex2html-init. It's in the same folder as prefs.pm. If left alone, this will definitely be a problem (if not now it will be later, so fix it now.) The "dot" is a result of NT's inability to correctly parse the filename during decompressing of the archive. L2h thinks this file is named .latex2html-init (with leading period instead of "dot"). I am assuming that 9x will similarly parse this filename incorrectly, but even if it is correct you want to rename it. Leading periods in filenames can sometines wreak havoc with DOS command interpreters. Rename it to something command.com can properly dealt with, e.g. l2hinit is what I use. It is necessary to inform l2h of the change, obviously. Before running config.bat, modify the l2hconf.pin file, which during execution of config.bat is built to l2hconf.pm. This is the global config file for l2h. # Local initialization files are usually named .latex2html-init # this name is hard-coded as the default with the latex2html script # It can be changed here, if desired: # # $INIT_FILE_NAME = '.latex2html-init'; Do not just uncomment and change this last line from '.latex2html-init' to 'l2hinit'. That won't work. Instead, just leave that line commented and add this new line: $INIT_FILE_NAME = $ENV{'L2HINIT_NAME'} || 'l2hinit'; ***Ross---For the benefit of windows users, it would be great if you could have the install take care of this automatically if a windows OS is present (and the renaming of the init file to match, too). 4. Change the default image type from png to gif. Not really necessary, but recommended since many browsers do not correctly render transparent png's. Although it may appear that l2h is not correctly rendering a transparent png, it is actually the web browser that is the culprit. ***Also I have noticed with some versions of netpbm, the test.bat will error out when trying to convert images. It will simply say "Error converting image" or somesuch, or in my case being on NT, in addition to that error I will get an NT error about a procedure entry point png_get_header_ver could not be located. This NT message does not appear on 9x, AFAIK, only the errors regarding the generation of images. I did not have this problem with previous versions of netpbm, so if png's are desirable one may wish to try downgrading the netpbm utilities. Several older versions should be available at Sourceforge. Otherwise, if you wish to use gif's instead, as most do I suppose, make this mod either in l2hconf.pin (before running config.bat) or directly to l2hconf.pm (after running config.bat): @IMAGE_TYPES = qw(gif png); The default has the order reversed, i.e. qw(png gif). Also be sure this line is not commented out. 5. Run config.bat. If execution seems to stop while checking dvips, just hit enter a time or two and it will resume. I noticed from your log that l2h was successful in recognizing GS: checking for gswin32c... C:\GS\GS7.04\BIN\gswin32c.exe checking for ghostscript version... 7.04 Many people on Wintel (myself included) will instead get: checking for gswin32c... no Warning: Will not be able to generate images due to above failure. ...and similar errors for the netpbm utilitites because we choose not to have all that stuff in our path. In case you didn't know, the prefs.pm mod that takes care of this without having to put GS and netpbm in the path is: $prefs{'EXTRAPATH'} = 'F:\\gs\\gs7.04\\bin;F:\\netpbm\\bin'; ...your paths may vary according to where you installed GS and netpbm, obviously. 6. If all's OK in config.log, run test.bat. See if your errors go away. 7. Look at test output with your browser and verify the mathematical formulae display correctly. 8. Run install.bat. Consider placing the l2h\bin folder in your path, so you can later run latex2html.bat from any directory. You may also wish to keep that l2hinit file discussed earlier (for some reason it did not seem to copy over to the install directory.) It doesn't really need to go there per se, but you will probably want to keep a copy of it _somewhere_ before you remove the expanded archive files that you ran the install from (which are now safe to delete since it is already "installed" at the destination folder.") Copies of l2hinit can be modified and placed accordingly to facilitate different local configurations (e.g. unique to each project, person, etc.) without having to all the time modify the l2hconf.pm, which applies global settings _before_ parsing l2hinit. Here is a useful document that you may or may not have looked at: http://www.mayer.dial.pipex.com/l2h.htm Darrell > > > > > > Similarly, the following is the segmented texts in pstoimg.bat after running install.bat: > > > > ....... > > # Ghostscript > > my $GS = 'C:\\gs\\gs8.00\\bin\\gswin32c.exe'; > > my $GSDEVICE = 'pnmraw'; > > my $GSALIASDEVICE = 'ppmraw'; > > ....... > > Looks good. > > > > Search path: > > . ; C:\gs\gs8.00\lib ; C:\gs\fonts ; c:/gs/gs8.00/lib ; c:/gs/fonts > > For more information, see c:/gs/gs8.00/doc/Use.htm. > > Report bugs to [EMAIL PROTECTED], using the form in Bug-form.htm. > > > > >> Converting image #2 > > >> pstoimg.bat: Error: Ghostscript returned error status 0 > > >> pstoimg.bat: Error: Couldn't find pnm output of C:\ChinaTeX\Temp\l2h1624\image002.ps > > So it looks like Ghostscript got started, but it failed for some reason. > > Run your job again, using the -debug switch. > > Post the output to the terminal that results. > Perhaps some of the extra messages will reveal something useful. > > This will also retain intermediate files, such as the .ps files, > and show LaTeX messages as well. > It may be that something is missing for LaTeX, resulting in one or more > empty, or otherwise bad, images. > > > Hope this helps, > > Ross Moore > > > > > > best regards, > > Shujun LI > > > > >> Hi all, > > >> > > >> I download the latest version of latex2html from www.latex2htm.org, but I encountered strange problem when I run test.bat after running config.bat. The problem is: all images, including the ones generated to display complex equations, cannot be displayed in the html pages. The report is as follows: > > >> > > >> Converting image #2 > > >> pstoimg.bat: Error: Ghostscript returned error status 0 > > >> pstoimg.bat: Error: Couldn't find pnm output of C:\ChinaTeX\Temp\l2h1624\image002.ps > > >> Error: Cannot read 'img2.gif': No such file or directory > > >> > > >> Although it seems that I have not correctly installed Ghostscript, I really installed the latest version (Ghostscript 8.00) and set "$prefs{'EXTRAPATH'} = 'C:\\gs\\gs8.00\\bin';" in prefs.pm before I ran config.bat. > > > > > >Hmm; I've never seen Ghostscript 8. > > >Can you please show me what message results from the following commands: > > > gs -v > > > gs --help > > > (just the first few lines, please) > > > > > > > > >> If I omit the problem and continue to run install.bat, the problem remains when I try to translate any .tex file to html documents. > > > > > >I'm guessing that the full path to Ghostscript was not found when you installed > > >LaTeX2HTML. There should be a message about this in the configure log. > > >This means that some variables, name $GS and starting $GS... will have empty > > >values instead of full directory paths. > > >You could try to find these and fix them, or wait until the installer is patched > > >to recognise this latest version of Ghostscript. > > > > > > > > >Hope this helps, > > > > > > Ross Moore > > > > > > > > >> Shujun Li > > >> E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] > > >> Institute of Image Processing > > >> School of Electronics & Information Engineering > > >> Xi'an Jiaotong University > > >> Xi'an, Shaanxi 710049, P. R. China > > >> My home page: http://www.hooklee.com > > >> Welcome to visit ChinaTeX: http://www.ctexer.net > > >> > > >> > > >> > > >> _______________________________________________ > > >> latex2html mailing list > > >> [EMAIL PROTECTED] > > >> http://tug.org/mailman/listinfo/latex2html > > > > > > > > > > _______________________________________________ > latex2html mailing list > [EMAIL PROTECTED] > http://tug.org/mailman/listinfo/latex2html _______________________________________________ latex2html mailing list [EMAIL PROTECTED] http://tug.org/mailman/listinfo/latex2html