From 2e33f672db656ae4e2a8dea20d08a7c335cdeb1a Mon Sep 17 00:00:00 2001 From: vky Date: Wed, 2 Sep 2026 03:26:11 +0200 Subject: [PATCH] added caption support logic --- setup/core/macros.typ | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup/core/macros.typ b/setup/core/macros.typ index 73b0700..42e1648 100644 --- a/setup/core/macros.typ +++ b/setup/core/macros.typ @@ -582,15 +582,18 @@ caption: none, stroke: 0.6pt + theme.border, clip: true, - inset: 0em, + inset: 0pt, align: left, ) = [ + // captions compatibility logic + // makes the bottom of the box larger to accomodate text + #if caption != none and inset == 0pt { + inset = (bottom: 0.7em) + } #let boxed = box( figure( image(source, width: width), - // Captions are temporarily disabled because wrap-content crops them below - // side illustrations. Keep the public argument for source compatibility. - caption: none, + caption: caption, ), inset: inset, radius: radius,