mathml/test_tex.lua

15 lines
430 B
Lua
Raw Normal View History

2021-04-18 15:19:52 +02:00
local inspect = require'inspect'
local function show(t) return print(inspect(t)) end
local mlist_to_table = require'mlist_to_mml'
local write_xml = require'write_xml'
2021-04-19 13:30:54 +02:00
luatexbase.add_to_callback('pre_mlist_to_hlist_filter', function(mlist, style)
2021-04-18 15:19:52 +02:00
print'\n\n'
2021-04-19 13:30:54 +02:00
local xml = mlist_to_table(mlist, style == 'display' and 2 or 0)
print(write_xml(xml))
-- print(write_xml(xml, '\n'))
2021-04-18 15:19:52 +02:00
print'\n'
return true
end, 'dump_list')