I don't normally use Win32, but I want to convert our 4AllTeX addicts to
TeX Live 2003. In testing release candidates, I encountered a few
problems with context and texexec. The most recent tests were with the
Sept. 5 release candidate (using the "install" CD).
1. on Win32, kpsewhich often fails to find texexec.ini. I created a
texexec.ini in texmf-var/context/config and verified that it is listed in
the ls-R. My conjecture is that this failure occurs if and only if the
final component of the nme of the current working directory contains an
embedded space, e.g., "C:\My Documents". Texexec takes a very long time
to run (searching the texmf trees on an unloved and unwanted PIII 300mhz),
so I haven't done a lot of testing/debugging. I haven't encountered any
other kpathsea failures. I can work around this by tweaking texexec.pl,
but it would be comforting to have an explanation.
2. ConTeXt texexec uses $ENV{"HOME"} to set a value in filename.tmp,
e.g., on unix:
$ cat try.tex
\starttext
\input story
\stoptext
$ texexec try
$ cat try.tmp
% try.top
\unprotect
\setupsystem[\c!gebied={/user/gwhite/}] %---- set from $ENV{"HOME"}
\setupsystem[\c!n=1]
\setupsystem[inputfile=try.tex]
\protect
If, e.g. HOME="/x y", the formatted document gets an extra page containing
"y//cont-err".
On Win32, it seems common to have spaces in "%HOME%". In particular, for
WinXP, a value appears to be constructed by the texexec.ini binary
(created using irun) if %HOME% is not set. I can work around this by
asking users to explicitly set HOME to something safe.
--
George White
1. on Win32, kpsewhich often fails to find texexec.ini. I created a
I have applied a couple of patches to texexec and texutil. They are attached.
2. ConTeXt texexec uses $ENV{"HOME"} to set a value in filename.tmp, e.g., on unix:
I tried your example and this is what I get : C:\tmp>cat try.tmp % try.top \unprotect \setupoutput[pdftex] \setupsystem[\c!gebied={C:/Documents and Settings/popineau/My Documents/}] \setupsystem[\c!n=2] \setupsystem[inputfile=try.tex] \protect Which seems correct, isn't it? Fabrice ==== //depot/Master/texmf/context/perltk/texexec.pl#32 - c:\source\texlive\Master\texmf\context\perltk\texexec.pl ==== @@ -390,6 +390,11 @@ { my $p = checked_path($_) . 'kpsewhich' ; if ((-e $p)||(-e $p . '.exe')) { $kpsewhich = $p ; +# Fix by Fabrice P +# irun.exe report $own_path to be c:/progra~1/texlive/bin/win32 +# and there is no space in it ! +# We could get spurious error messages here if there $p has spaces and $own_quote is not set + $own_quote = ($kpsewhich =~ m/^[^\"].* / ? "\"" : "") ; $IniPath = found_ini_file("ini") ; unless (-e $IniPath) { $IniPath = found_ini_file("rme") } last } } ==== //depot/Master/texmf/context/perltk/texexec.pl#34 - c:\source\texlive\Master\texmf\context\perltk\texexec.pl ==== ==== //depot/Master/texmf/context/perltk/texutil.pl#25 - c:\source\texlive\Master\texmf\context\perltk\texutil.pl ==== @@ -800,6 +800,7 @@ { my $p = checked_path($_) . 'kpsewhich' ; if ((-e $p)||(-e $p . '.exe')) { $kpsewhich = $p ; last } } } + $kpsewhich = "\"$kpsewhich\"" if ($kpsewhich =~ m/^[^\"].* / ? "\"" : "") ; while (<TEX>) { chomp ; my $Filter ; ==== //depot/Master/texmf/context/perltk/texutil.pl#26 - c:\source\texlive\Master\texmf\context\perltk\texutil.pl ====
On Mon, 15 Sep 2003, Fabrice Popineau wrote:
1. on Win32, kpsewhich often fails to find texexec.ini. I created a
I have applied a couple of patches to texexec and texutil. They are attached.
This morning, on Win98, texexec.exe reliably failed to find texexec.ini. I see that the full path of texexec.exe is passed into the backticks: my $IniPath = `$own_quote$kpsewhich$own_quote --format="other text files" -progname=context texexec.$suffix` ; replacing "$kpsewhich" with "kpsewhich" got things working. I wonder if this is some Win98 command buffer length issue. Is it necessary to pass the full path (e.g., C:\PROGRA~1\TEXLIVE\BIN\WIN32\KPSEWHICH.EXE)?
2. ConTeXt texexec uses $ENV{"HOME"} to set a value in filename.tmp, e.g., on unix:
I tried your example and this is what I get :
C:\tmp>cat try.tmp % try.top \unprotect \setupoutput[pdftex] \setupsystem[\c!gebied={C:/Documents and Settings/popineau/My Documents/}] \setupsystem[\c!n=2] \setupsystem[inputfile=try.tex] \protect
Which seems correct, isn't it?
My guess is that when kpathsea is failing, you are supposed to get a
message in "$HOME/cont-err", but instead you end up with text on an
extra page, something like:
and Settings/popineau/My Documents//cont-err
which suggests the error is likely written to C:/Documents.
I didn't have a chance to test your patch today.
Currently, texexec.pl tries a brute force search if kpathsea fails to find
texexec.ini or texexec.rme. On the Win98 PC I'm using, this search takes
much longer than I'm willing to wait. Would it be better to exit with a
suggestion that the user investigate the problem with kpathsea?
--
George N. White III
On Mon, 15 Sep 2003, Fabrice Popineau wrote:
1. on Win32, kpsewhich often fails to find texexec.ini. I created a
I have applied a couple of patches to texexec and texutil. They are attached.
The Sept. 5th rc had the patches in texexec.pl, but not in texutil.pl.
I don't think my files work enough to get to that section of texutil
(I added some print statements around the patch and don't see any output).
Now I have a problem with texfont, which reports:
processing aborted: unknown tex root c:/program
I applied the same recipe as in texutil:
chop($fontroot);
$fontroot = "\"$fontroot\"" if ($fontroot =~ m/^[^\"].* / ? "\"" : "") ;
but now I get:
processing aborted: unknown tex root "c:/program
files/texlive/texmf-local"
This is starting to look like too much work. We are supposed to
move from Win98 to WinXP "real soon now". Are these problems also
present for WinXP? For myself, *n*x works, but some groups rely on
Adobe Illustrator + Photoshop and understandably are reluctant to give
up Win32.
--
George White
On Wed, 17 Sep 2003, George White wrote:
This is starting to look like too much work. We are supposed to move from Win98 to WinXP "real soon now". Are these problems also present for WinXP? For myself, *n*x works, but some groups rely on Adobe Illustrator + Photoshop and understandably are reluctant to give up Win32.
I found out about this problem over a year ago and it was even discussed on this list, but nobody came up with a really working fix. So my solution in both my old WindowsNT and in my current Windows2000 (and my homeXP) has been NOT to install TeXLive in Program Files. Instead I have installed TeXLive directly under the root, i.e. I have a directory C:\TeXLive and that works fine. On my old desktop at work with WindowsNT I actually had TeXLive on the second partition for the while, i.e. at D:\TeXLive and even that worked fine. It does not seem to bother TeXLive ConTeXt that the .tex files are in a path with couple of spaces (like c:\Documents and Settings\Mari\My Documents\ConTeXt\test.tex) as long as TeXLive itself is installed somewhere without spaces. I know this is a workaround, but at least as long TeXLive is installed individually (not from the network, it is an easy solution. Just change to root directory in the beginning of the installation and everything else will work out. I don't really have any other options than the workaround or having somebody come up with a real fix, because the other users of "my" computers would be majorly annoyed if I went *n*x... Mari (mix-and-match Windows user, although in the Emacs school)
On Wed, 17 Sep 2003, Mari Voipio wrote:
It does not seem to bother TeXLive ConTeXt that the .tex files are in a path with couple of spaces (like c:\Documents and Settings\Mari\My Documents\ConTeXt\test.tex) as long as TeXLive itself is installed somewhere without spaces.
Thanks for the suggestion. We can certainly do that, and it should
eliminate many of the errors (especially if some are due to a command-line
buffer limit), but leaves the problem with the "HOME" directory.
Have you tried this with TeX Live 2003?
Do you set HOME=??? and what do you get for the gebied entry in, e.g.,
test.tmp?
Are you using irun generated .exe files for texexec, etc.?
--
George N. White III
On Wed, 17 Sep 2003, Mari Voipio wrote:
It does not seem to bother TeXLive ConTeXt that the .tex files are in a path with couple of spaces (like c:\Documents and Settings\Mari\My Documents\ConTeXt\test.tex) as long as TeXLive itself is installed somewhere without spaces.
This morning I uninstalled the Sept. 5 rc and installed today's (Sept. 18)
rc in C:\TeXLive on a Win98 system with HOME=c:\home to avoid all cases
where spaces get into file paths. Again, kpathsea run via the command
line found my texexec.ini, but the irun generated texexec.exe failed to
find it. This time I modified "sub found_ini_file" in texexec.pl to
replace the "/" with "\" in $kpsewhich. This is rather odd, as in most
cases not involving a command line you can use "/" in file paths. There
are probably other places were backtick is used that will require the same
change, and they are only to be used for "$dosish" systems.
It is past my bedtime, so I'll have to cut this short. Weather
permitting, I'll be out of the office until October, but I'll try to post
some reasonable patches at the earliest opportunity.
--
George N. White III
participants (4)
-
Fabrice Popineau
-
George N. White III
-
George White
-
Mari Voipio