Fix style flag handling
This commit is contained in:
parent
e1b8debcf6
commit
e76d9ec8bf
@ -102,7 +102,7 @@ luatexbase.add_to_callback('pre_mlist_to_hlist_filter', function(mlist, style)
|
||||
end
|
||||
local display = style == 'display'
|
||||
local startmath = tex.nest.top.tail -- Must come before any write_struct calls which adds nodes
|
||||
style = flag & 16 == 4 and flag>>5 & 0x7 or display and 0 or 2
|
||||
style = flag & 16 == 16 and flag>>5 & 0x7 or display and 0 or 2
|
||||
local xml, core = process_mlist(mlist, style)
|
||||
if flag & 2 == 2 then
|
||||
xml = save_result(shallow_copy(xml), display)
|
||||
|
@ -70,7 +70,7 @@ for i, block in ipairs(parsed.groups) do
|
||||
local flag, tag, label = block.flag, block.tag, block.label
|
||||
block = block[1]
|
||||
if flag & 3 ~= 0 then
|
||||
local style = block.display and 0 or 2
|
||||
local style = flag & 16 == 16 and flag>>5 & 0x7 or block.display and 0 or 2
|
||||
local xml = convert.process(parse_showlists(block, nil, nil, parsed), style)
|
||||
if flag & 2 == 2 then
|
||||
local stream = out_stream or assert(io.open(out_prefix .. tostring(i) .. out_suffix, 'w'))
|
||||
@ -84,7 +84,7 @@ for i, block in ipairs(parsed.groups) do
|
||||
xml = {[0] = tag, xml}
|
||||
end
|
||||
end
|
||||
if style == 2 and flag & 1 == 1 and label then
|
||||
if (not block.display) and flag & 1 == 1 and label then
|
||||
if parsed.mathml[label] then
|
||||
error'Invalid label reuse'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user