From 226efa46b715703a74bfcbae05fe45a9198bc027 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Wed, 28 Aug 2024 13:53:37 +0200 Subject: [PATCH] added length support for width parmeter --- src/utils.typ | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.typ b/src/utils.typ index b4eae86..219501c 100644 --- a/src/utils.typ +++ b/src/utils.typ @@ -51,7 +51,10 @@ let w = m.width let h = m.height let r = if w == 0pt {0} else { - if width == auto {1} else { + if width == auto {1} + else if type(width) == length { + width / w + } else { size.width * width / w } }