On 13 Apr 2008 at 13:31, [EMAIL PROTECTED] wrote: Hallo Taco,
thank you for your example. > % start low-level > \startlua > local function finder(name, mode, ftype) > if mode=="w" then > return name > else > return kpse.find_file(name,ftype) > end > end > mp = mplib.new ( { > hash_size = 100000, > main_memory = 2000000, > param_size = 100000, > find_file = finder, > ini_version = true > } ) > if mp then > res = mp:execute('plain') > mp:finish() > end this first step runs with res=0, but there is no 'plain.mem' dumped. (I have temporary appended 'dump;' to plain.mp) this first step runs with res=0 with mp:execute('mpost'), but no 'mpost.mem' the first step even runs with res=0 and mp:execute('\\plain; dump;'), but no 'plain.mem' after that I produced 'plain.mem' executing 'texmfstart texexec --make plain' > > mp = mplib.new ( { > hash_size = 100000, > main_memory = 2000000, > param_size = 100000, > find_file = finder, > } ) > > if mp then > res = mp:execute( > "\\beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye;" ) > tex.print("[" .. tostring(res.status) .. "]") > mp:finish() > end > \stoplua > % stop low-level > this second step returns res=3. Is there a find_file function necessary to find the mem-file given in 'mem_name' or is such a function only necessary for file-names in 'mp:execute'? Wolfgang -- Musensturm-Verlag -- Postfach 1249 -- 36126 Gersfeld >>> http://www.musensturm.de ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___________________________________________________________________________________