On Wed, 12 Aug 2009, Andreas Harder wrote:
In the "real world“ I've stripped quotes form another document and stored them in buffer-environments (attachment).
Save them as lua tables. Much easier to manipulate than tex objects.
With your solution I've no idea how to incorporate them in a "automatic" manner.
You just need to work a little harder. \startbuffer[1] This is a test \stopbuffer \startbuffer[2] Another test \stopbuffer \startbuffer[3] And again \stopbuffer \startluacode userdata = userdata or {} function userdata.shift(i) return "(" .. i .. "cm ," .. i .. "cm )" end function userdata.buffers(i) local idx = string.format("%s",i) local b = buffers.data[idx] if b then if type(b) == "table" then return table.concat(b) else return b end else return "unknown" end end function userdata.draw_buffer(i) return "draw btex " .. userdata.buffers(i) .. " etex shifted ".. userdata.shift(i) .. ";" end \stopluacode \starttext \startluacode context.startMPpage({offset = "1ex", width = [[\paperwidth]], height = [[\paperheight]]}) for i = 1,3 do context(userdata.draw_buffer(i)) end context.stopMPpage() \stopluacode \stoptext Aditya