C:\Documents and Settings\Peter Denisevich\Local Settings\Temp
which is referenced by the environment variable
TEMP=C:\DOCUME~1\PETERD~1\LOCALS~1\Temp
Purifyeps chokes on this as follows:
F:\home\pdenis\mp>purifyeps.pl t.eps t1.eps
pstoedit: version 3.33 / DLL interface 108 (build Jan 6 2003 -
release build)
Copyright (C) 1993 - 2003 Wolfgang Glunz
Interpreter finished. Return status 0
This is MetaPost, Version 0.641 (Web2c 7.5.2)
(f:/TeXLive/texmf/web2c/cp8bit.tcx)
! I can't find file `C:/DOCUME?1/PETERD?1/LOCALS?1/Temp/
purifyeps.pl-c0WXN4Eu.mp'.
<*> ...RD?1/LOCALS?1/Temp/purifyeps.pl-c0WXN4Eu.mp
Please type another input file name: ! I can't find file `X'.
<*> ...RD?1/LOCALS?1/Temp/purifyeps.pl-c0WXN4Eu.mp
Please type another input file name:
! Emergency stop.
<*> ...RD?1/LOCALS?1/Temp/purifyeps.pl-c0WXN4Eu.mp
Transcript written on mpout.log.
purifyeps.pl: The following command failed with exit code 1:
echo X | mpost
C:\DOCUME~1\PETERD~1\LOCALS~1\Temp\purifyeps.pl-c0WXN4Eu.mp
------------------------------------------------
Note that the tildes (~) have been replaced with question marks.
Digging around I find that my MetaPost can't handle filenames
containing ~'s:
F:\home\pdenis\mp>mpost test~1.eps
This is MetaPost, Version 0.641 (Web2c 7.5.2)
(f:/TeXLive/texmf/web2c/cp8bit.tcx)
! I can't find file `test?1.eps'.
<*> test?1.eps
F:\home\pdenis\mp>mpost --version
MetaPost (Web2c 7.5.2) 0.641
kpathsea version 3.5.2
-------------------------------------------------
Is this expected MetaPost behavior, a Web2C problem, something
specific to this build, or what? (Note that my METAFONT doesn't
work on such filenames either, though TeX does...)
In the meantime I can get around it at least for my single-user
home system either by defining another temp directory (set
TMPDIR=f:\temp) but I'm not sure this is portable to multiuser
Win2K/XPsetups. Or I can edit the purifyeps Perl script to write
its temp files to the current directory where the purified eps
file is to be output (replacing both occurences of
File::Spec->tmpdir() with "\.") -- this *looks* safe from what I
can make of the Perl.
Comments (in addition to curses at Bill Gates)?
--
Peter Denisevich, Fairfax, California
Use The TeXbook to decode my email adddress.
I'd suspect an fpTeX problem, as I can't reproduce it on Win32/MikTeX
(which does not use Web2C):
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
c:\temp>mpost --version
mpost --version
MiKTeX-mp;mpost 1.8 (MetaPost 0.641) (MiKTeX 2.1)
Copyright 1990 - 1995 by AT&T Bell Laboratories
TeX is a trademark of the American Mathematical Society.
METAFONT is a trademark of Addison-Wesley Publishing Company.
PostScript is a trademark of Adobe Systems Incorporated.
...or on Linux/teTeX (which does use Web2C):
% mpost --version
MetaPost (Web2C 7.3.1) 0.641
kpathsea version 3.3.1
Copyright (C) 1999 AT&T Bell Laboratories.
Kpathsea is copyright (C) 1999 Free Software Foundation, Inc.
There is NO warranty. Redistribution of this software is
covered by the terms of both the MetaPost copyright and
the GNU General Public License.
For more information about these matters, see the files
named COPYING and the MetaPost source.
Primary author of MetaPost: John Hobby.
Kpathsea written by Karl Berry and others.
-- Scott
>I've been trying to use purifyeps (from TeXLive 2003 with updates)
>under Windows 2000. I ran into problems involving the TEMP
>environment variable -- on my system the default tempdir is the
>horrible:
>
>C:\Documents and Settings\Peter Denisevich\Local Settings\Temp
>
>which is referenced by the environment variable
>TEMP=C:\DOCUME~1\PETERD~1\LOCALS~1\Temp
>
>Purifyeps chokes on this as follows:
[snip]
>
>Please type another input file name: ! I can't find file `X'.
><*> ...RD?1/LOCALS?1/Temp/purifyeps.pl-c0WXN4Eu.mp
[snip]
>purifyeps.pl: The following command failed with exit code 1:
> echo X | mpost
>C:\DOCUME~1\PETERD~1\LOCALS~1\Temp\purifyeps.pl-c0WXN4Eu.mp
>
>Note that the tildes (~) have been replaced with question marks.
>
>Digging around I find that my MetaPost can't handle filenames
>containing ~'s:
>
>F:\home\pdenis\mp>mpost test~1.eps
>This is MetaPost, Version 0.641 (Web2c 7.5.2)
>(f:/TeXLive/texmf/web2c/cp8bit.tcx)
>! I can't find file `test?1.eps'.
><*> test?1.eps
Mine (same version) adds this:
kpathsea: Illegal fontname 'test?1.eps': contains '?'
And putting "input test~1.eps" in an mp file causes no problem.
Nor does running
mpost
and then typing test~1.mp at the ** prompt.
It would appear that the problem happens somewhere between the
command line and the call to the kpathsea routines.
If it will help any one, here is a portion of the output of
mpost --kpathsea-debug=5 test~1.mp
It shows tha first instance of the correct filename through the
first instance of the mangle version:
kdebug:kpse_normalize_path (.) => 0
kdebug:kpse_normalize_path (.) => 0
kdebug:kpse_normalize_path (.) => 0
path . is a directory
kdebug:kpse_normalize_path (./test~1.mp) => 0
kdebug:fopen(./test~1.mp, r) => 0x7c38b548
kdebug:fclose(0x7c38b548) => 0
kdebug:kpse_normalize_path (c:/TeX/texmf-var/web2c) => 3
kdebug:kpse_normalize_path (c:/TeX/texmf-local/web2c) => 3
kdebug:kpse_normalize_path (c:/TeX/texmf/web2c) => 3
kdebug:kpse_normalize_path (c:/TeX/texmf/web2c/cp8bit.tcx) => 3
kdebug:fopen(c:/TeX/texmf/web2c/cp8bit.tcx, r) => 0x7c38b548
kdebug:fclose(0x7c38b548) => 0
kdebug:kpse_normalize_path (.) => 0
kdebug:kpse_normalize_path (./mpost.mem) => 0
kdebug:kpse_normalize_path (c:/TeX/texmf-var/web2c) => 3
kdebug:kpse_normalize_path (c:/TeX/texmf-var/web2c/mpost.mem) => 3
kdebug:fopen(c:/TeX/texmf-var/web2c/mpost.mem, rb) => 0x7c38b548
kdebug:fclose(0x7c38b548) => 0
kdebug:kpse_normalize_path (.) => 0
kdebug:kpse_normalize_path (./test?1.mp) => 0
I thought cp8bit.tcx might be the culprit, but TeX uses the same
file and it ends up with the correct filename throughout the
corresponding debug output.
>In the meantime I can get around it at least for my single-user
>home system either by defining another temp directory (set
>TMPDIR=f:\temp) but I'm not sure this is portable to multiuser
>Win2K/XPsetups. Or I can edit the purifyeps Perl script to write
>its temp files to the current directory where the purified eps
>file is to be output (replacing both occurences of
>File::Spec->tmpdir() with "\.") -- this *looks* safe from what I
>can make of the Perl.
It should be OK.
I have always set TEMP (as well as HOME) to a pathname without
spaces. It was bad enough that Windows 95 put programs in
"Program Files", but WinXP putting everyone's temp and home directories
under "Documents and Settings" was a new level of evil.
>
>Comments (in addition to curses at Bill Gates).
Since you ask for comments "in addition to curses", here are my
required curses:
May he be condemned to use Windows software through eternity
_without_ any help from his employees at Redmond.
May he be required to apologize to Windows users for eternity
(or until all forgive him, whichever is soonest).
Dan
--
Dan Luecking Department of Mathematical Sciences
University of Arkansas Fayetteville, Arkansas 72701
To reply by email, change Look-In-Sig to luecking
>On Fri, 05 Mar 2004 04:38:21 GMT, Peter Denisevich
>
>
<snip>
Thanks, Dan and Scott for your help. I'll send a copy of this to
Fabrice via the fpTeX mailing list.
-peter
--
Peter Denisevich
Fairfax, California
Use The TeXbook to decode my email adddress:
<pdenis at pangea dot drofnats dot edu>
I can confirm that part of the problem is a bug in fptex. The support
for file names with spaces is broken for mf.exe and mpost.exe. Sorry
for that. It is fixed in my build tree and I will make new binaries
available.
May I also remember people that win32 filenames shouldn't be \input
into tex with the usual windows syntax because \, ~ etc. are or maybe
active chars interpreted by tex. So the syntax to use would rather be:
c:/documents and settings/user/local settings/temp/...
Fabrice