Normally, if #image is wrapped in #figure, the figure is aligned to the center of the page.
How can I align figures and their captions to the left instead, in the whole document?
Normally, if #image is wrapped in #figure, the figure is aligned to the center of the page.
How can I align figures and their captions to the left instead, in the whole document?
To align all figure kinds to the left you can use #show figure: set align(start), to only affect figures with images you can use #show figure.where(kind: image): set align(start).
Do you happen to know how to set figure in center but caption on the left? I also already have a function that positions caption on top of the figure. Thank you!
Sure, Typst has figure.caption to set caption specific properties. Depending on what exactly you want you have to also set the block width of the figure.
#show figure.caption: set align(left)
#set figure.caption(position: top)
#figure(
caption: [Figure.],
image("image.jpg", width: 50%)
)
#show figure: set block(width: 100%)
#figure(
caption: [Figure.],
image("image.jpg", width: 50%)
)