On 1/15/2015 2:54 PM, Taco Hoekwater wrote:
Hi Hans,
Lately, I am doing quite a lot of work with CLD, and sometimes I do not trust my Lua code completely. To allow some rudimentary debugging, I have patched my local cldf-ini.lua to contain this:
local dumpfile = io.open('dumpfile.txt', 'w') local function flush (z,...) if type(z) == 'number' then dumpfile:write(string.format('%02d ', z)) else dumpfile:write(' ') dumpfile:write(z) end for _,v in ipairs({...}) do dumpfile:write (v) end dumpfile:write ('\n') texsprint(z,...) end
instead of the normal
local flush = texsprint
That way, I can look in dumpfile.txt to make sure that the correct ConTeXt code is generated. Is there any chance that you could offer a tracker/messaging feature with similar functionality? Patching cldf-ini.lua is not nice ;)
\enabletrackers[context.*] ----------------------------------------------------------------- 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 -----------------------------------------------------------------