<div dir="ltr">Hi,<div>I do not understand why the following code does not produce a log and a height (or width) for the fig. Any help to find out what I do not do right?</div><div><br></div><div>Thanks in advance</div><div><br></div><div>Maxime Chupin</div><div><br></div><div>local mpkpse = kpse.new('luatex', 'mpost')<br><br>local function finder(name, mode, ftype)<br>   if mode == "w" then<br>  return name<br>   else<br>  return mpkpse:find_file(name,ftype)<br>   end<br>end<br><br><br>function getpathfrommp(s)<br>   local mp = mplib.new({<br>         find_file = finder,})<br>   mp:execute('input plain ;')<br>   local rettable<br>   rettable = mp:execute('beginfig(1); draw (0,0)--(2cm,2cm); endfig;')<br>   print("\nstatus: ".. rettable.status)<br>   print(rettable.log)<br>   if rettable.status == 0 then<br>      print("height: "..rettable.fig[1]:height())<br>   end<br>end<br><br><div>getpathfrommp()<br></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Maxime Chupin<br>Site personnel : <a href="http://fougeriens.org/~mc/" target="_blank">http://fougeriens.org/~mc/</a><br>Site professionnel : <a href="http://www.ceremade.dauphine.fr/~chupin/" target="_blank">https://www.ceremade.dauphine.fr/~chupin/</a><br></div><div>adresse libre : <a href="mailto:chupin@fougeriens.org" target="_blank">chupin@fougeriens.org</a></div></div></div></div></div></div></div>