[NTG-context] fixing mpiv on installation path with spaces
Mojca Miklavec
mojca.miklavec.lists at gmail.com
Wed May 16 01:45:30 CEST 2012
Hello,
last year Taco added many patches to make sure that ConTeXt works even
when installed to "C:\Documents and Settings\ ..." and other weird
paths with spaces. However metapost in mkiv still fails. I figured out
that the following patch (which *won't* handle paths with quotation
marks properly) in mlib-run.lua fixes the problem:
local preamble = [[
boolean mplib ; mplib := true ;
let dump = endinput ;
- input %s ;
+ input "%s" ;
]]
but I'm not sure if there are any other side effects or if there are
other places that also need a patch. I didn't test with filenames with
spaces or with filenames with weird characters that need escaping.
Maybe it would be helpful to pass
file.addsuffix(name,"mp")
through additional filter (instead of simply adding quotation marks)
that would also check if any other character needs escaping and add
quotation marks if needed.
Minimal example:
- install ConTeXt into path with spaces
- test with context on
\starttext
\startMPcode
draw fullcircle scaled 3cm;
\stopMPcode
\stoptext
I would be grateful if somebody could take a look, so that a fix could
make it into TL 2012.
Thanks,
Mojca
More information about the ntg-context
mailing list