How to resize a figure to make it small?

I have the following dummy code

#figure(
    grid(
        columns: (1fr, 1fr),
        rows: (auto, auto),
        gutter: auto,
        random-fractal-tree(  // Configuration params),
        lsystem( // Configuration params),
    ),
    kind: image,
    caption: [Dummy figure]
)

I have converted the grid into a figure with a caption. How can I resize (width and height) the figure to make it smaller?

Thank you.

Hello @Andrew_Duncan,

I don’t have access to my PC right now as I’m in Japan traveling.

You could set two show rules! The first one adjusts the width of a figure and the other one centers the figure:

#show figure: set block(width: 80%)
#show figure: set align(center)

If you only want to have it specifically for one figure, just encase the whole thing in a scope #[...].

Hope this helps!

1 Like

Thank you for your support.

For inline comments, there is block syntax: Syntax – Typst Documentation

#figure(
    grid(
        columns: (1fr, 1fr),
        rows: 2,
        random-fractal-tree(/* Configuration params */),
        lsystem(/* Configuration params */),
    ),
    caption: [Dummy figure]
)

This also keeps the syntax highlighting correct.

Not sure what gutter: auto does, probably not needed. Clarify `grid.column-gutter` docs (take 2) · Issue #6391 · typst/typst · GitHub