added caption support logic

This commit is contained in:
vky 2026-09-02 03:26:11 +02:00
parent 3d7199dfe7
commit 2e33f672db
Signed by: vky
GPG Key ID: 26F26F83B3CAA4BA
1 changed files with 7 additions and 4 deletions

View File

@ -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,