summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/meta-imp-txt.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-06-08 10:23:49 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-06-08 10:23:49 +0200
commit86bfea5faac983d15c47eec27f43ec56e75c69ef (patch)
tree69a37851a9b8beeb625110f4fc51ff1ef188d7e4 /tex/context/base/mkiv/meta-imp-txt.mkiv
parentc2d2236242c95f4753e7b197d576102c6fc20446 (diff)
downloadcontext-86bfea5faac983d15c47eec27f43ec56e75c69ef.tar.gz
2018-06-08 09:38:00
Diffstat (limited to 'tex/context/base/mkiv/meta-imp-txt.mkiv')
-rw-r--r--tex/context/base/mkiv/meta-imp-txt.mkiv19
1 files changed, 15 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/meta-imp-txt.mkiv b/tex/context/base/mkiv/meta-imp-txt.mkiv
index 34e36ae54..2e950d5c8 100644
--- a/tex/context/base/mkiv/meta-imp-txt.mkiv
+++ b/tex/context/base/mkiv/meta-imp-txt.mkiv
@@ -202,6 +202,8 @@
\stopMPdefinitions
\startluacode
+ local context = context
+
local nodecodes = nodes.nodecodes
local kerncodes = nodes.kerncodes
@@ -217,10 +219,19 @@
local c_userkern = kerncodes.userkern
local a_fontkern = attributes.private("fontkern")
+ local copynode = nodes.copy
+ local freenode = nodes.free
+
+ local topoints = number.topoints
+ local mpprint = mp.print
+
local n = nil
local s = 0
function mp.follow_reset()
+ for i=1,#n do
+ freenode(n[i])
+ end
n = nil
s = 0
end
@@ -251,19 +262,19 @@
end
function mp.follow_size()
- mp.print(s)
+ mpprint(s)
end
function mp.follow_slot(i)
- mp.print('textext("\\getfollowtoken{' .. i .. '}")')
+ mpprint('textext("\\getfollowtoken{' .. i .. '}")')
end
function mp.follow_text(s)
- context(n[s])
+ context(copynode(n[s]))
end
function mp.follow_width(i)
- mp.print(number.topoints(n[i].width))
+ mpprint(topoints(n[i].width))
end
\stopluacode