diff options
Diffstat (limited to 'tex/context/base/mkiv/scrp-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/scrp-ini.lua | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/scrp-ini.lua b/tex/context/base/mkiv/scrp-ini.lua index 0fafd9854..857d2ac6e 100644 --- a/tex/context/base/mkiv/scrp-ini.lua +++ b/tex/context/base/mkiv/scrp-ini.lua @@ -57,9 +57,6 @@ local setglyphdata = nuts.setglyphdata local isglyph = nuts.isglyph -local insertnodeafter = nuts.insertafter -local insertnodebefore = nuts.insertbefore - local firstglyph = nuts.firstglyph local nextglyph = nuts.traversers.glyph @@ -86,6 +83,9 @@ scripts.injectors = handlers local splitters = allocate() scripts.splitters = splitters +local helpers = allocate() +scripts.helpers = helpers + -- we need to fake it in luatex local getscript = node.direct.getscript @@ -116,6 +116,29 @@ if not getscript then end +local insertnodebefore, insertnodeafter do + + local insertafter = nuts.insertnodeafter + local insertbefore = nuts.insertnodebefore + local setattributelist = nuts.setattributelist + + local function insertnodebefore(head,current,what) -- todo : lmtx + head, current = insertbefore(head,current,what) + setattributelist(what,current) + return head, current + end + + local function insertnodeafter(head,current,what) -- todo : lmtx + head, current = insertafter(head,current,what) + setattributelist(what,current) + return head, current + end + + helpers.insertnodebefore = insertnodebefore + helpers.insertnodeafter = insertnodeafter + +end + local hash = { -- we could put these presets in char-def.lua -- -- half width opening parenthesis |