Boxing & Blocking

You can use boxes to wrap anything
into text: #box(image("../tiger.jpg", height: 2em)).

Blocks will always be "separate paragraphs".
They will not fit into a text: #block(image("../tiger.jpg", height: 2em))
Rendered image

Both have similar useful properties:

#box(stroke: red, inset: 1em)[Box text]
#block(stroke: red, inset: 1em)[Block text]
Rendered image

rect

There is also rect that works like block, but has useful default inset and stroke:

#rect[Block text]
Rendered image

Figures

For the purposes of adding a figure to your document, use figure function. Don't try to use boxes or blocks there.

Figures are that things like centered images (probably with captions), tables, even code.

@tiger shows a tiger. Tigers
are animals.

#figure(
  image("../tiger.jpg", width: 80%),
  caption: [A tiger.],
) <tiger>
Rendered image

In fact, you can put there anything you want:

They told me to write a letter to you. Here it is:

#figure(
  text(size: 5em)[I],
  caption: [I'm cool, right?],
) 
Rendered image