From 8b4e9490086f4009928824ce39b0f3245f1f811e Mon Sep 17 00:00:00 2001 From: Ulrike Fischer Date: Sun, 23 Feb 2025 19:58:39 +0100 Subject: [PATCH] add system-of-equation intent --- luamml-amsmath.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/luamml-amsmath.lua b/luamml-amsmath.lua index d64f7df..445c9f0 100644 --- a/luamml-amsmath.lua +++ b/luamml-amsmath.lua @@ -67,10 +67,11 @@ do lua.get_functions_table()[funcid] = function() -- TODO: Error handling etc local kind = token.scan_argument() + kind = kind:gsub("*","") local mml_table = get_table() if not mml_table then return end mml_table.displaystyle = true - mml_table.class=kind:gsub("*","") + mml_table.class=kind if kind=="split" then add_intent_continued_row (mml_table) end @@ -118,10 +119,15 @@ token.set_lua('__luamml_amsmath_finalize_table:n', funcid) lua.get_functions_table()[funcid] = function() -- TODO: Error handling etc local kind = token.scan_argument() + kind = kind:gsub("*","") local mml_table = get_table() if not mml_table then return end 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 mml_table.columnalign = kind == 'align' and 'left '..string.rep('right left', columns, ' ') or nil mml_table.width = kind == 'multline' and '100%' or nil