On 5-7-2010 9:41, Taco Hoekwater wrote:
On 07/04/2010 07:39 PM, Marco wrote:
Hi,
when there's a mistake in the context code then the context call returns »1«. When there's a mistake in the metapost code then the context call returns »0«.
This is annoying for me, since I use the return value as indicator for my pdf reader to refresh. This seems like a bug to me. Is there a workaround?
Like this maybe, this converts metapost errors into a series of tex errors:
\startluacode function report_mplib_error (...) local v = string.format(...) tex.sprint(tex.ctxcatcodes,"\\errmessage{") tex.sprint(tex.vrbcatcodes,v) tex.print(tex.ctxcatcodes,"}") end
i added something like this as option \enabledirectives[mplib.texerrors] \startMPcode draww fullcircle ; \stopMPcode this then can be set in texmfcnf.lua in the directives table mplib.texerrors = "yes", no beta yet ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------