Skip to content

Commit 9ce5271

Browse files
OmikhleiaDidier Willis
authored andcommitted
fix(math): Default table row/column spacing must depend on the math font size
I don't really mind us using the (non-Core) rowspacing and columnspacing attributes, but the default values must be a ratio of the current math font size, not some hard-coded value in pt.
1 parent 5dffc31 commit 9ce5271

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/math/base-elements.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,9 +1180,9 @@ function elements.table:_init (children, options)
11801180
return #row.children
11811181
end, self.children)))
11821182
SU.debug("math", "self.ncols =", self.ncols)
1183-
self.rowspacing = self.options.rowspacing and SILE.types.length(self.options.rowspacing) or SILE.types.length("7pt")
1184-
self.columnspacing = self.options.columnspacing and SILE.types.length(self.options.columnspacing)
1185-
or SILE.types.length("6pt")
1183+
local spacing = SILE.settings:get("math.font.size") * 0.6 -- arbitrary ratio of the current math font size
1184+
self.rowspacing = self.options.rowspacing and SILE.types.length(self.options.rowspacing) or spacing
1185+
self.columnspacing = self.options.columnspacing and SILE.types.length(self.options.columnspacing) or spacing
11861186
-- Pad rows that do not have enough cells by adding cells to the
11871187
-- right.
11881188
for i, row in ipairs(self.children) do

0 commit comments

Comments
 (0)