Hi All I have a quick question about the behaviour of btex...etex. The code below works perfectly until I include any mp code which make use of btex...etex. I keep getting errors like this:
mapmax.mp mapmax.mpx ! Unable to make mpx file. l.383 l abel.bot(btex $\reals$ etex, q+(0,-b));
I am running a slightly older version of LuaTeX on Windows Vista Version beta-0.53.0-2010032719 I am NOT using ConTeXt but simply using a version of Plain. Just for the record I do all MetaPost PS --> PDF with a call to GhostScript via a Lua binding. I think that in the "old days" all the btex/etex stuff was handled by a set of calls to an external program which processed the DVI -- makempx or something like that?? Can anyone tell me how MPlib now handles btex...etex so that I can try to figure out why it might be failing. I'm not sure but it may be that some calls to making temporary files are failing, but that's just a guess. Any insights into the low level btex...etex machinery would be great. Many thanks to all and best wishes Graham ===== ========================================== Test MP code ========================================== local function finder(name, mode, ftype) local found if mode=="w" then found = name else found = kpse.find_file(name,ftype) end if found then print("MPlib finder: " .. name .. " -> " .. found) end return found end mp = mplib.new ( { hash_size = 100000, main_memory = 2000000, param_size = 100000, ini_version=false, mem_name=plain, find_file = finder, } ) if mp then texio.write_nl("mp is OK") res=mp:execute("beginfig(1); u=1cm; draw (2u,2u)--(0,0)--(0,3u)--(3u,0)--(0,0); pickup pencircle scaled 4pt; for i=0 upto 2: for j=0 upto 2: drawdot (i*u,j*u); endfor endfor endfig; beginfig(2); numeric scf, #, t[]; 3.2scf = 2.4in; path fun; # = .1; % Keep the function single-valued fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}..{curl .1}(3.2,2#)) yscaled(1/#) scaled scf; x1 = 2.5scf; for i=1 upto 2: (t[i],whatever) = fun intersectiontimes ((x[i],-infinity)--(x[i],infinity)); z[i] = point t[i] of fun; z[i]-(x[i+1],0) = whatever*direction t[i] of fun; draw (x[i],0)--z[i]--(x[i+1],0); fill fullcircle scaled 3bp shifted z[i]; endfor draw (0,0)--(3.2scf,0); pickup pencircle scaled 1pt; draw fun; endfig; beginfig(3); draw fullcircle scaled 2cm withpen pencircle xscaled 1mm yscaled .5mm rotated 30 withcolor .75red ; endfig; bye;" )