From 64d5adfb33b245325238ee7e773ab5726084e660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Sat, 1 May 2021 08:03:21 +0200 Subject: [PATCH] Adjust to_text interface --- luamml-amsmath.lua | 2 +- luamml-array.lua | 2 +- luamml-convert.lua | 2 +- luamml-lr.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/luamml-amsmath.lua b/luamml-amsmath.lua index 6ee40e0..453b543 100644 --- a/luamml-amsmath.lua +++ b/luamml-amsmath.lua @@ -43,7 +43,7 @@ token.set_lua('__luamml_amsmath_save_tag:', funcid, 'protected') lua.get_functions_table()[funcid] = function() local nest = tex.nest.top local chars = {} - last_tag = {[0] = 'mtext', to_text(nest.head)} + last_tag = to_text(nest.head) end funcid = luatexbase.new_luafunction'__luamml_amsmath_set_tag:' diff --git a/luamml-array.lua b/luamml-array.lua index d946a8b..61c6097 100644 --- a/luamml-array.lua +++ b/luamml-array.lua @@ -48,7 +48,7 @@ lua.get_functions_table()[funcid] = function() else -- Oh no, we got text. Let't complain to the user, it's probably their fault print'We are mathematicians, don\'t bother us with text' - store_column_xml{[0] = 'mtext', to_text(startmath, tex.nest.top.tail)} + store_column_xml(to_text(startmath, tex.nest.top.tail)) end end diff --git a/luamml-convert.lua b/luamml-convert.lua index 164b733..3518422 100644 --- a/luamml-convert.lua +++ b/luamml-convert.lua @@ -89,7 +89,7 @@ local function kernel_to_table(kernel, cur_style) return result, result elseif id == sub_box_t then if kernel.list.id == hlist_t then -- We directly give up for vlists - local result = {[0] = 'mtext', to_text(kernel.list.head)} + local result = to_text(kernel.list.head) return result, result else local result = {[0] = 'mi', {[0] = 'mglyph', ['tex:box'] = kernel.list}} diff --git a/luamml-lr.lua b/luamml-lr.lua index d4921d1..9e529fc 100644 --- a/luamml-lr.lua +++ b/luamml-lr.lua @@ -57,7 +57,7 @@ local function to_unicode(head, tail) end -- CHECK: Everything else can probably be ignored, otherwise shout at me end end - return table.concat(result) + return {[0] = 'mtext', table.concat(result)} end return to_unicode