Hallo Taco et al
> >>>> \startlua
> >>>> local function finder(name, mode, ftype)
> >>>> if mode=="w" then
> >>>> return name
> >>>> else
> >>>> return kpse.find_file(name,ftype)
> >>>> end
> >>>> end
> >
> > Jein!
> >
>
> Try this, a little more elaborate, version of finder:
>
> local function finder(name, mode, ftype)
> local found
> if mode=="w" then
> found = name
> else
> found = kpse.find_file(name,ftype)
> end
> print("MPlib finder: " .. name .. " -> " .. found)
> return found
> end
>
> maybe that will give a clue.
Example 1: my test file with your finder.
--------------------------------------------------------------
MPlib finder: mpost.mp -> d:/context/tex/texmf/metapost/base/mpost.mp
MPlib finder: mpost.map ->
MPlib finder: plain.mp -> d:/context/tex/texmf/metapost/base/plain.mp
t={
["log"]="This is MetaPost, Version 1.003 (INIMP) 23 APR 2008 07:51
(mpost.mp(plain.mp\
Preloading the plain mem file, version 0.99)",
["status"]=0,
["term"]="This is MetaPost, Version 1.003 (Cweb version 0.40)
(INIMP)\
(mpost.mp(plain.mp\
Preloading the plain mem file, version 0.99)",
}
MPlib finder: mpost.mem ->
t={
["log"]=" )\
Beginning to dump on file mpost.mem\
(mem=mpost 8.4.23)\
at most 736 strings of total length 3629\
3326 memory locations dumped; current usage is 1021&2227\
501 symbolic tokens\
",
["status"]=0,
["term"]=" )\
Beginning to dump on file mpost.mem\
(mem=mpost 8.4.23)\
at most 736 strings of total length 3629\
3326 memory locations dumped; current usage is 1021&2227\
501 symbolic tokens\
Transcript written on mpost.log.\
",
}
--------------------------------------------------------------
found = ""
no mpost.mem, no mpost.log
Example 2: my test file with your finder and ("wb" not "w")
--------------------------------------------------------------
MPlib finder: mpost.mp -> d:/context/tex/texmf/metapost/base/mpost.mp
MPlib finder: mpost.map ->
MPlib finder: plain.mp -> d:/context/tex/texmf/metapost/base/plain.mp
t={
["log"]="This is MetaPost, Version 1.003 (INIMP) 23 APR 2008 07:58
(mpost.mp(plain.mp\
Preloading the plain mem file, version 0.99)",
["status"]=0,
["term"]="This is MetaPost, Version 1.003 (Cweb version 0.40)
(INIMP)\
(mpost.mp(plain.mp\
Preloading the plain mem file, version 0.99)",
}
MPlib finder: mpost.mem -> mpost.mem
t={
["log"]=" )\
Beginning to dump on file mpost.mem\
(mem=mpost 8.4.23)\
at most 736 strings of total length 3629\
3326 memory locations dumped; current usage is 1021&2227\
501 symbolic tokens\
",
["status"]=0,
["term"]=" )\
Beginning to dump on file mpost.mem\
(mem=mpost 8.4.23)\
at most 736 strings of total length 3629\
3326 memory locations dumped; current usage is 1021&2227\
501 symbolic tokens\
Transcript written on mpost.log.\
",
}
--------------------------------------------------------------
mpost.mem gets written now
but no mpost.log
grusz Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________