ok thanks for staying with me on this on Steve ...

I have done a clean install of the Lyx bundle and also the latest Miktex 2.5 on my home Windows XP computer.

I do not have any C:\texmf\usr\bin.

I have tried your suggestions of the xypic.tex etc.

I have set the PATH to a minimum of paths needed.

#1 Here I try to execute with the bundled Miktex:

C:\texmf\miktex\bin>path
PATH=c:\program files\imagemagick-6.2.8-q16;C:\texmf\miktex\bin;C:\Program Files\gs\gs8.54\bin;C:\Program Files\LyX14\bin;C:\Program Files
\LyX14\shell\bin;C:\WINDOWS\system32

C:\texmf\miktex\bin>htlatex xypic.tex
htlatex: the batch script could not be found.

#2 Here I try to execute with Miktex 2.5

C:\Program Files\MiKTeX 2.5\miktex\bin>path
PATH=C:\Program Files\MiKTeX 2.5\miktex\bin;c:\program files\imagemagick-6.2.8-q16;C:\Program Files\gs\gs8.54\bin;C:\Program
Files\LyX14\bin;C:\Program Files\LyX14\shell\bin;C:\WINDOWS\system32;

C:\Program Files\MiKTeX 2.5\miktex\bin>htlatex xypic.tex
htlatex: The Windows command script file could not be found.


In both cases if I add a htlatex.bat to the bin directory, the bat file is executed but nothing else happens.

Without knowing this system at all really, it seems as tho:
a) this htlatex.bat file MUST be present. Has anyone else got one ? If so where from ? b) the contents of this .bat calls other things that actually do the conversion. Is the an example of the contents around ?

I have googled my butt off trying to find hits for this, but to no avail.

I cannot really make my environment any simpler.
Is there any config of some sort you have to run on Miktex after install to set things up right ?

So I have done 2 straight forward installs on 2 seperate PC's, no tweaking and exactly the same results. There must be something fundamental missing here. An extra step no documented ???

btw with your comment "SH: You meant MIKTEX~2.5 not MIKTEX~1.5, right? "
I think it was just a coincidental windows name shortening that made it look like i had 1.5 on, really it was 2.5 for sure.

Cheers
Dean

Steve Harris wrote:
Dean O'Connor wrote:

Hello Dean,

I'm going to interweave my reply into your post rather
than bottom post, starting each with an "SH:"

Much appreciate all that info.

Firstly I hope the Lyx website can add the Export->HTML (etc) to their
list of Known Bugs. Save a lot of grief. If its there, appologies I
could not see it.


SH: I didn't see it either. I saw saw comments about latex2html
and files not being copied from tmp directories, but nothing
about the long hang when trying to export as html.

LyX runs a process called "configure" which finds different helper
apps. Sometimes you can see it finding htlatex in the black dos box.

So LyX calles htlatex if you have it installed which means making
sure that htlatex runs from the command line is a priority since
if it doesn't run from the command line it surely won't run from LyX.

Now onto the work around.

The Lyx 1.4.2 all-in-one install puts all these in the Lyx Path Prefix:
C:\Program Files\LyX14\latextools;C:\Program
Files\LyX14\python;C:\Program
Files\LyX14\shell\bin;C:\texmf\miktex\bin;C:\Program
Files\gs\gs8.54\bin;C:\Program Files\ImageMagick-6.2.8-Q16


SH: I don't know what goes into latextools, but this looks pretty good.

This is my env path value:

PATH=c:\program
files\imagemagick-6.2.8-q16;C:\texmf\miktex\bin;C:\Perl\bin\;C:\WINDOWS\
system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Progra
m Files\Common Files\GTK\2.0\bin\;C:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\projects\clarite\trunk\xercesc\Xerces-C_3_0_0_d
ev\Bu
ild\Win32\VC8\Release;C:\tools;C:\Program Files\Microsoft Visual
Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual
Studio\Common\MSD
ev98\Bin;C:\Program Files\Microsoft Visual
Studio\Common\Tools;C:\Program Files\Microsoft Visual
Studio\VC98\bin;C:\Program Files\gs\gs8.54\bi
n;C:\Program Files\LyX14\python

PATH=c:\program
files\imagemagick-6.2.8-q16;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;
C:\WINDOWS\System32\Wbem;C:\Progra
m Files\Common Files\GTK\2.0\bin\;C:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\projects\clarite\trunk\xercesc\Xerces-C_3_0_0_d
ev\Bu
ild\Win32\VC8\Release;C:\tools;C:\Program Files\Microsoft Visual
Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual
Studio\Common\MSD
ev98\Bin;C:\Program Files\Microsoft Visual
Studio\Common\Tools;C:\Program Files\Microsoft Visual
Studio\VC98\bin;C:\Program Files\gs\gs8.54\bi
n;C:\Program Files\ImageMagick-6.2.8-Q16;C:\Program Files\LyX14\python

The Miktex directory with the Lyx bundle is: C:\texmf\miktex\bin

If I type "convert" I get the ImageMagick one.


SH: This also looks pretty good.

I also have installed the latest Miktex 2.5 beta (just now) and tried
running htlatex from there.
In a separate command window for that I put its own path at front of
PATH.
Ie. Above path prefixed with: C:\Program Files\MiKTeX 2.5\miktex\bin

In both the bundle and the beta Miktex environments (which use the same
ImageMagick and GS paths) I get the same problem.

If I run htlatex.exe .. They both say:
C:\texmf\miktex\bin>htlatex c:\docs\newfile1.tex
htlatex: the batch script could not be found.

C:\PROGRA~1\MIKTEX~1.5\miktex\bin>htlatex c:\docs\newfile1.tex
htlatex: The Windows command script file could not be found.


SH: You meant MIKTEX~2.5 not MIKTEX~1.5, right?
I saw the first error message here (part of the Miktex Library)

------------------------------------------------

http://www.koders.com/cpp/fid6740B87FEE382B9ACFF601ACB7D55D929FEFD106.aspx

// find batch file
  _TCHAR szScriptPath[_MAX_PATH];
  if (! FindBatchFile(szName, szScriptPath))
    {
      _ftprintf (stderr,
         _T("%s: the batch script could not be found.\n"),
         szName);
      return (1);

----------------------------------------------

SH: I've never seen the other error message. htlatex.exe is
an executable, it might invoke a script but I'm not so sure
that htlatex is corrupt because it isn't a script.

Let's make sure you actually have it: C:\texmf\miktex\bin
and I also have it in C:\texmf\usr\bin
check to see if htlatex.exe is actually there.

http://www.mathematik.uni-marburg.de/~gumm/LyX/Using_XYpic_in_LyX.htm
This webpage demonstrates "htlatex xypic.tex" -> xypic.html

http://www.mathematik.uni-marburg.de/%7Egumm/LyX/xypic/
download xypic.tex, xypic.aux, and xyfigure.png into your
C:\texmf\miktex\bin and run "htlatex xypic.tex" from C:\texmf\miktex\bin
If it works you can remove all the .png files with "del *.png" <enter>
I suspect it is not going to work. I want to remove a troubleshooting
variable even though the way you did it above should work properly.

I want to be sure about htlatex.exe existing in your Miktex2.5 package
also. htlatex should be under \texmf\miktex\bin in this location too.
But these downloads come in small, large, and total. You may not
have received the tex4ht.cab which contains htlatex.exe in the
download you chose, so make sure htlatex.exe exists there.

If I add an empty htlatex.bat file to both directories, it stops that
error, but nothing happens. Ie. It executes that batch file.
Why ? What is it with the batch file ?

It makes me think something else not htlatex is broken.
I used to do LyX tests. I installed TexLive 2005 a not
quite equal to Miktex program. It wrote some system
environmental variables which I forgot about. Then I
uninstalled it. Later I installed Cygwin and Tetex
which used a different TEXMF environment variable.
Cygwin didn't work until I finally noticed one day
that I had entries in my environment from departed
programs. Well make sure you have htlatex in your
Miktex2.5 version and test it with xypic.tex contained
in same the same directory as htlatex.exe when you
execute the command. htlatex xypic.tex

If you are still getting the same result, it is
hardly likely that the installation was corrupted
both times. So that means there is a conflict between
your filename executables or maybe your environmental
variables; it made me suspicious when I found that
"the batch script could not be found" error message
originating from the Miktex Library. I don't know if
any of your programming apps contain sh.exe or sed.exe
but I think just MS Unix tools has them.

Obviously I am missing some fundamental Miktex piece of the puzzle here,
but to be honest both installs were smooth as.

Any ideas ?


SH: Do any of those other programs contain python.exe too.
Python runs most of the LyX scripts now with some sh.exe.

Cheers
Dean.


Just when I thought I could solve any of this type of problem,
Stephen


Reply via email to