summaryrefslogtreecommitdiff
path: root/macros/luatex/latex/longmath/longmath.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/latex/longmath/longmath.lua')
-rw-r--r--macros/luatex/latex/longmath/longmath.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/macros/luatex/latex/longmath/longmath.lua b/macros/luatex/latex/longmath/longmath.lua
index 56c64c8cdb..05524096ca 100644
--- a/macros/luatex/latex/longmath/longmath.lua
+++ b/macros/luatex/latex/longmath/longmath.lua
@@ -1,5 +1,5 @@
--
--- longmath.lua is part of longmath version 0.1.
+-- longmath.lua is part of longmath version 1.0.
--
-- (c) 2024 Hans-Jürgen Matschull
--
@@ -141,15 +141,16 @@ local function set_delim( head, level, ht, dp )
if brks then brks = brks[type] end
if type and auto and brks then
delim_set( delim, brks[level] )
- elseif type and brks then
- level = nil
- for l = 1, #brks do if delim_eq( brks[l], delim ) then level = l break end end
else
level = nil
end
local scale = node.get_attribute( hbox, attr_info )
- hbox.height, hbox.depth = ht * scale // 1000, dp * scale // 1000
- if delim_eq( delim, delim_null ) then hbox.width = hbox.width * 2 end
+ hbox.height, hbox.depth = ht * scale // 1000, dp * scale // 1000
+ if delim_eq( delim, delim_null ) then
+ hbox.width = -2 * tex.dimen.nulldelimiterspace
+ else
+ hbox.width = -tex.dimen.nulldelimiterspace
+ end
return level
end