Simplify internal interface

This commit is contained in:
Marcel Fabian Krüger 2021-05-02 02:58:20 +02:00
parent 912173cab1
commit 11206aecde
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ lua.get_functions_table()[funcid] = function()
spacing[#spacing+1] = n.width == 0 and '0' or '.8em' spacing[#spacing+1] = n.width == 0 and '0' or '.8em'
end end
mml_table.columnspacing = table.concat(spacing, ' ', 2, #spacing-2) mml_table.columnspacing = table.concat(spacing, ' ', 2, #spacing-2)
save_result(mml_table, 0) save_result(mml_table, true)
end end
local last_tag local last_tag

View File

@ -38,8 +38,8 @@ end
local mlist_buffer local mlist_buffer
local mlist_result local mlist_result
local function save_result(xml, style) local function save_result(xml, display)
mlist_result = write_xml(make_root(xml, style)) mlist_result = write_xml(make_root(xml, display and 0 or 2))
if tex.count.tracingmathml > 1 then if tex.count.tracingmathml > 1 then
texio.write_nl(mlist_result .. '\n') texio.write_nl(mlist_result .. '\n')
end end
@ -64,7 +64,7 @@ luatexbase.add_to_callback('pre_mlist_to_hlist_filter', function(mlist, style)
end end
local xml = process_mlist(new_mlist, style == 'display' and 0 or 2) local xml = process_mlist(new_mlist, style == 'display' and 0 or 2)
if flag & 2 == 0 then if flag & 2 == 0 then
save_result(xml, (style == 'display' or flag & 1 == 1) and 0 or 2) save_result(xml, style == 'display' or flag & 1 == 1)
else else
assert(style == 'text') assert(style == 'text')
local startmath = tex.nest.top.tail local startmath = tex.nest.top.tail