Add \RegisterFamilyMapping
This commit is contained in:
parent
948818c8bc
commit
e0705c210b
@ -636,6 +636,7 @@ end
|
||||
|
||||
return {
|
||||
register_family = register_remap,
|
||||
register_text_family = function(fam) text_families[fam] = true end,
|
||||
process = function(head, style) return nodes_to_table(head, style or 2) end,
|
||||
make_root = to_math,
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ local mlist_to_mml = require'luamml-convert'
|
||||
local process_mlist = mlist_to_mml.process
|
||||
local make_root = mlist_to_mml.make_root
|
||||
local register_family = mlist_to_mml.register_family
|
||||
local register_text_family = mlist_to_mml.register_text_family
|
||||
|
||||
local mappings = require'luamml-legacy-mappings'
|
||||
local write_xml = require'luamml-xmlwriter'
|
||||
@ -23,6 +24,14 @@ lua.get_functions_table()[funcid] = function()
|
||||
end
|
||||
end
|
||||
|
||||
local funcid = luatexbase.new_luafunction'RegisterFamilyMapping'
|
||||
token.set_lua('RegisterTextFamily', funcid, 'protected')
|
||||
lua.get_functions_table()[funcid] = function()
|
||||
local fam = token.scan_int()
|
||||
local kind = token.scan_string()
|
||||
register_text_family(fam, kind)
|
||||
end
|
||||
|
||||
local function shallow_copy(t)
|
||||
local tt = {}
|
||||
for k,v in next, t do
|
||||
|
Loading…
Reference in New Issue
Block a user