Fix align spacing

This commit is contained in:
Marcel Fabian Krüger 2021-04-27 01:47:42 +02:00
parent 040f29aeaa
commit 1185a8987e
3 changed files with 7 additions and 3 deletions

View File

@ -70,7 +70,7 @@ lua.get_functions_table()[funcid] = function()
if not mml_table then return end
local columns = node.count(node.id'align_record', tex.lists.align_head)//2
mml_table.columnalign = string.rep('right left', columns, ' ')
mml_table.columnalign = string.rep('0.3em', columns, '0.8em ') -- FIXME: 0.3em is a hack needed since MathML doesn't add spacing for our empty mrow
mml_table.columnspacing = string.rep('0', columns, ' 0.8em ') -- FIXME: 0.3em is a hack needed since MathML doesn't add spacing for our empty mrow
save_result(mml_table, 0)
end

View File

@ -376,10 +376,14 @@ function nodes_to_table(head, cur_style)
end
nonscript = nil
if core and new_core ~= space_like then
core = new_core
core = core == space_like and new_core or nil
end
mn = new_mn
end
-- In TeX, groups are never space like
if core == space_like then
result[#result+1] = {[0] = 'mi', intent = '@ignore'}
end
if t[0] == 'mrow' and #t == 1 then
assert(t == result)
result = t[1]

View File

@ -25,7 +25,7 @@
\]
\begin{align}
abc&=def\\
abc&=def & e^{\mathrm{i}\pi}&=-1\\
1+2&=3\\
5
\end{align}