From b5ce8e615c5e22c087ea8c8c6f7e30266e0f8634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20A=2E=20Quinaglia?= Date: Wed, 31 Jan 2024 16:38:10 -0300 Subject: [PATCH] feat(packages): Add balancing option to makecolums command (#1950) --- packages/frametricks/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/frametricks/init.lua b/packages/frametricks/init.lua index 6b1ae6754..f9fe1123b 100644 --- a/packages/frametricks/init.lua +++ b/packages/frametricks/init.lua @@ -42,6 +42,7 @@ end local makecolumns = function (options) local cFrame = SILE.typesetter.frame local cols = options.columns + local balanced = SU.boolean(options.balanced, true) local gutterWidth = options.gutter or "3%pw" local right = cFrame:right() local origId = cFrame.id @@ -58,8 +59,8 @@ local makecolumns = function (options) bottom = cFrame:bottom(), id = origId .. "_col"..i }) - newFrame.balanced = true - cFrame.balanced = true + newFrame.balanced = balanced + cFrame.balanced = balanced gutter:constrain("right", "left("..newFrame.id..")") newFrame:constrain("left", "right("..gutter.id..")") -- In the future we may way to allow for unequal columns