Hello! I am using typst with quarto. When I create an image, such as

This inserts image not centered, but if I will add name

It will be centered, but with label “Figure X: any_name”.
I want centered image without name. I know that one can add {fig-align: center}, but I don’t want to add it each time I create an image wihtout name. So is it possible to somehow set that in typst-template or quarto initial settings?
I have no idea how quarto works. From your description, I guess the first snipped will be converted to a simple Typst image. In your Typst template you can set the alignment for all images with:
#show image: set align(center)
I think it is probably better to ask quarto related questions first to quarto people as I think there is a bigger overlap of people using both tools.
---
title: "some title"
format: typst
keep-typ: true
---
## Figure without text
```{=typst}
#show box: set align(center)
```

## Figure with text

will evaluate to (a ton of document style followed by):
...
= Figure without text
<figure-without-text>
#show box: set align(center)
#box(image("fig-center-demo_files\\mediabag\\FiKGhYhhIWJYiBgWIoaF.png"))
= Figure with text
<figure-with-text>
#figure([
#box(image("fig-center-demo_files\\mediabag\\FiKGhYhhIWJYiBgWIoaF.png"))
], caption: figure.caption(
position: bottom,
[
i have text
]),
kind: "quarto-float-fig",
supplement: "Figure",
)
where the placeholder shortcode generates the two temporary figures fig-center-demo_files/*.png based on the name of your file, here fig-center-demo.qmd.
Hello! Thank you very much for answers. The information about that the image is displayed in the box instead of figure helped me a lot. Some said that I can use show box rule with center aligning, but that will align every single box in the document (which will lead for table of contents to become a mess), so this way is good, but one need to make rule logic more complex.
So, I found an idea:
show box: it => {
if it.body.func() == image {
align(center)[#it]
} else {
it
}
}
This will center align only images. Thank you for the answers!