2 Oct
2012
2 Oct
'12
1:54 p.m.
Am 02.10.2012 um 13:41 schrieb Andre Caldas
I am trying to redefine the ’open_read_file’ callback.
[...] utilities.sequencers.appendaction(textfileactions, "system","document.MyCharacterMess")
All I want is to get the full path (or path relative to lfs.currentdir()). Is "textfileactions" the action I should trap?
\starttext \startluacode function document.MyCharacterMess(str,filename) local path = "Path: " .. file.dirname(filename) local text = "Text: " .. str return table.concat({path,text},"\n\n") end local textfileactions = resolvers.openers.helpers.textfileactions utilities.sequencers.appendaction(textfileactions,"system","document.MyCharacterMess") \stopluacode \input ward \stoptext Wolfgang