On 10 January 2016 at 19:21, Gavin Smith <[email protected]> wrote:
> For LuaTeX the code should be something like
Here's the code that worked for me:
local function convert_line_out (line)
local line_out = ""
for c in string.utfvalues(line) do
line_out = line_out .. string.char(c)
end
return line_out
end
callback.register("process_output_buffer", convert_line_out)
Apparently LuaTeX will freeze if there's an error in the lua code.
Also it has its own versions of the Lua libraries: string.utfvalues
was mentioned in the LuaTeX reference manual, and the other functions
I was trying to use evidently weren't there.