Meander allows you to wrap content around images. It supports images of arbitrary shape, and is therefore currently the best Typst alternative to both LaTeX’s parshape and wrapfig.
It’s as easy as:
#let my-img-1 = box(width: 7cm, height: 7cm, fill: orange)
#let my-img-2 = box(width: 5cm, height: 3cm, fill: blue)
#let my-img-3 = box(width: 8cm, height: 4cm, fill: green)
#let my-img-4 = box(width: 5cm, height: 5cm, fill: red)
#let my-img-5 = box(width: 4cm, height: 3cm, fill: yellow)
#import "@preview/meander:0.2.2"
#meander.reflow({
import meander: *
// Place as many obstacles as you want.
placed(top + left, my-img-1)
placed(top + right, my-img-2)
placed(horizon + right, my-img-3)
placed(bottom + left, my-img-4)
placed(bottom + left, dx: 32%, my-img-5)
// The container wraps around all.
container()
// The content is automatically threaded through
// the segmented container.
content[
#set par(justify: true)
#lorem(430)
]
})
As of version 0.2.2 released today, here are some examples of outputs that Meander allows you to achieve relatively easily:
(Requested in: [1], [2]; realized in examples/5181-a)
(Requested in: [1], [2]; realized in examples/5181-b)
(Inspired by: [3]; realized in examples/area-of-a-circle)
(Requested in: [2]; realized in examples/talmudifier)
(Requested in: [1]; realized in examples/cow)
You can find more details in the documentation, and you’re welcome to open a new issue if your use-case is not supported or not convenient.







