add system-of-equation intent
This commit is contained in:
parent
c83f29d906
commit
8b4e949008
@ -67,10 +67,11 @@ do
|
|||||||
lua.get_functions_table()[funcid] = function()
|
lua.get_functions_table()[funcid] = function()
|
||||||
-- TODO: Error handling etc
|
-- TODO: Error handling etc
|
||||||
local kind = token.scan_argument()
|
local kind = token.scan_argument()
|
||||||
|
kind = kind:gsub("*","")
|
||||||
local mml_table = get_table()
|
local mml_table = get_table()
|
||||||
if not mml_table then return end
|
if not mml_table then return end
|
||||||
mml_table.displaystyle = true
|
mml_table.displaystyle = true
|
||||||
mml_table.class=kind:gsub("*","")
|
mml_table.class=kind
|
||||||
if kind=="split" then
|
if kind=="split" then
|
||||||
add_intent_continued_row (mml_table)
|
add_intent_continued_row (mml_table)
|
||||||
end
|
end
|
||||||
@ -118,10 +119,15 @@ token.set_lua('__luamml_amsmath_finalize_table:n', funcid)
|
|||||||
lua.get_functions_table()[funcid] = function()
|
lua.get_functions_table()[funcid] = function()
|
||||||
-- TODO: Error handling etc
|
-- TODO: Error handling etc
|
||||||
local kind = token.scan_argument()
|
local kind = token.scan_argument()
|
||||||
|
kind = kind:gsub("*","")
|
||||||
local mml_table = get_table()
|
local mml_table = get_table()
|
||||||
if not mml_table then return end
|
if not mml_table then return end
|
||||||
mml_table.displaystyle = true
|
mml_table.displaystyle = true
|
||||||
mml_table.class=kind:gsub("*","")
|
mml_table.class=kind
|
||||||
|
-- this should perhaps be configurable and extendable
|
||||||
|
if kind == 'align' or 'alignat' or 'flalign' or 'xalignat' or 'xxalignat' then
|
||||||
|
mml_table.intent=":system-of-equation"
|
||||||
|
end
|
||||||
local columns = node.count(node.id'align_record', tex.lists.align_head)//2
|
local columns = node.count(node.id'align_record', tex.lists.align_head)//2
|
||||||
mml_table.columnalign = kind == 'align' and 'left '..string.rep('right left', columns, ' ') or nil
|
mml_table.columnalign = kind == 'align' and 'left '..string.rep('right left', columns, ' ') or nil
|
||||||
mml_table.width = kind == 'multline' and '100%' or nil
|
mml_table.width = kind == 'multline' and '100%' or nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user