add pause intent
This commit is contained in:
parent
b2afb8400a
commit
7e98f39ee9
@ -60,6 +60,21 @@ local function add_intent_continued_row (table)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- This function add an intent =":pause-medium" on every second mtd in a table
|
||||||
|
-- currently it is also on the first (after the label) but this could be changed
|
||||||
|
-- used in __luamml_amsmath_finalize_table:n for
|
||||||
|
-- 'align' or 'alignat' or 'flalign' or 'xalignat' or 'xxalignat'
|
||||||
|
local function add_intent_pause (mmltable)
|
||||||
|
for mtrindex,mtrtable in ipairs(mmltable) do
|
||||||
|
for mtdindex,mtdtable in ipairs(mtrtable) do
|
||||||
|
if (mtdindex % 2 == 0) then
|
||||||
|
mtdtable['intent']=':pause-medium'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- debug function for tables
|
-- debug function for tables
|
||||||
-- activate with \directlua{debugmtable=2} or \directlua{debugmtable='split'}
|
-- activate with \directlua{debugmtable=2} or \directlua{debugmtable='split'}
|
||||||
local function debug_mtable (mtable,kind)
|
local function debug_mtable (mtable,kind)
|
||||||
@ -140,6 +155,7 @@ lua.get_functions_table()[funcid] = function()
|
|||||||
-- this should perhaps be configurable and extendable
|
-- this should perhaps be configurable and extendable
|
||||||
if kind == 'align' or 'alignat' or 'flalign' or 'xalignat' or 'xxalignat' then
|
if kind == 'align' or 'alignat' or 'flalign' or 'xalignat' or 'xxalignat' then
|
||||||
mml_table.intent=":system-of-equations"
|
mml_table.intent=":system-of-equations"
|
||||||
|
add_intent_pause (mml_table)
|
||||||
end
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user