u/shitHappensX

Image 1 — automosaic: Automatic aspect-preserving (photo) layout engine
Image 2 — automosaic: Automatic aspect-preserving (photo) layout engine
▲ 53 r/typst

automosaic: Automatic aspect-preserving (photo) layout engine

I created a (photo) layout package which preserves aspect-ratios and (optionally) computes an optimal layout automatically while filling the parent container as good as possible. You can flip through variations/"less optimal" layouts by changing a counter.

https://typst.app/universe/package/automosaic

I used it to create an 80-page photobook, so it is definitely very workable!

The call syntax is quite minimal:

#context display-auto-layout(

(

image("a.jpg"),

image("b.jpg"),

image("c.jpg"),

(body: image("d.jpg"), weight: 2), // this image gets more space in the auto-layout

// selector: "1",

)

u/shitHappensX — 10 days ago