added caption support logic
This commit is contained in:
parent
3d7199dfe7
commit
2e33f672db
|
|
@ -582,15 +582,18 @@
|
||||||
caption: none,
|
caption: none,
|
||||||
stroke: 0.6pt + theme.border,
|
stroke: 0.6pt + theme.border,
|
||||||
clip: true,
|
clip: true,
|
||||||
inset: 0em,
|
inset: 0pt,
|
||||||
align: left,
|
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(
|
#let boxed = box(
|
||||||
figure(
|
figure(
|
||||||
image(source, width: width),
|
image(source, width: width),
|
||||||
// Captions are temporarily disabled because wrap-content crops them below
|
caption: caption,
|
||||||
// side illustrations. Keep the public argument for source compatibility.
|
|
||||||
caption: none,
|
|
||||||
),
|
),
|
||||||
inset: inset,
|
inset: inset,
|
||||||
radius: radius,
|
radius: radius,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue