[l2h] Problem with LaTeX2html/MikTeX

Igor Pechtchanski pechtcha at cs.nyu.edu
Wed Jul 20 00:35:02 CEST 2005


On Tue, 19 Jul 2005, Andrew McArdle wrote:

> Dear All,
>
> I a currently investigating converting a large LaTeX document into HTML in
> the hope of then converting that to Microsoft Word format, in order to allow
> someone who wants to use Word to correct some work to do so.
>
> I believe that I have all the required software (netpbm and Ghostscript),
> and the progam seems to configure and install fine. However, when I run
> test.bat, or pdf2latex.bat on any file it crashes like this:
>
> <CMD.EXE>
> 31/33:section:."section" for node31.html
> ;.,;....
>
> 32/33:section:."section" for node32.html
> ;.,,;............
>
> 33/33:sectionstar:.."About this document ..." for node33.html
> ;;.
>
> Writing image file ...
>
> 'I:\Program' is not recognized as an internal or external command,
> operable program or batch file.
>
> Cannot read logfile './images.log': No such file or directory
>
> I:\Andrew\University\Pathology\Project\Write-up\LaTeX>
> </CMD.EXE>

Looks like an unquoted system() call inside latex2html.  Running in
debug mode should show which exact command fails.

> I have both Ghostscript and MikTeX installed in Program Files (which I
> certainly wouldn't do now!), and am running Windows XP for what it's worth,
> and because I am now on a slow connection I am not in a position to
> reinstall MikTeX. I am not sure what throws up the error, and haven't had
> any success in scouring the perl of latex2html.bat.
>
> I made sure that the cfgcache.pm and prefs.pm files contained only
> I:\progra~1 instead of the full path beforehand, so this isn't the cause of
> the error. I have also searched for any mention of "I:\program" or
> "I:\\program" in the latex2html directory and have found nothing.

Check your environment variables as well.

> Can anyone suggest where this error comes from: is it trying to find
> Ghostscript or some LaTeX-related files? I looked for all mentions of
> system or exec in the perl file, in the hope that I could fix the error
> by double-quoting any paths, but that led me nowhere, so I am a bit
> stuck! Any help you can give would be appreciated.

As far as I can see, latex2html mostly uses L2hos->syswait(...) to make
system calls (which, on Win32, simply runs system(...)).  Search for all
occurrences of those -- there are quite a few unquoted invocations of,
say, $LATEX.

> Am I even looking in the right place to convert LaTeX to a Word
> document? I have seen some Word document converters, but I suspect the
> latex2html converter will cope better with the use of packages and
> commands etc. Am I right?

I've used ltx2rtf, with reasonable success, but that was on a
non-math-heavy file.  YMMV.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA



More information about the latex2html mailing list