diff options
Diffstat (limited to 'tex/context/base/lxml-tex.lua')
-rw-r--r-- | tex/context/base/lxml-tex.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua index c1284b87b..0305b889e 100644 --- a/tex/context/base/lxml-tex.lua +++ b/tex/context/base/lxml-tex.lua @@ -904,6 +904,10 @@ local function position(collected,n) end end +local function match(collected) + texwrite((collected and collected[1].mi) or 0) +end + local function index(collected,n) if collected then n = tonumber(n) or 0 @@ -1018,6 +1022,7 @@ finalizers.command = command finalizers.attribute = attribute finalizers.text = text finalizers.position = position +finalizers.match = match finalizers.index = index finalizers.concat = concat finalizers.concatrange = concatrange @@ -1202,6 +1207,10 @@ function lxml.name(id) -- or remapped name? -> lxml.info, combine end end +function lxml.match(id) -- or remapped name? -> lxml.info, combine + texsprint(get_id(id).mi or 0) +end + function lxml.tag(id) -- tag vs name -> also in l-xml tag->name texsprint(get_id(id).tg or "") end |