How to save enum counter value?

Hi,
I’m using numbered list like this:

+ apple
+ orange
// a figure is inserted here.
+ banana

The numbering will break at the figure and restart from 1 at banana.
It is possible to reset the enum number by
#set enum( start: ...)
But is there a better way to do it? Can I save and load the counter value?
Thank you.

typst version 0.13.1

Hi there, to continue the numbering, just indent the picture or whatever else you are inserting in the list.

+ Banana
+ Apple
  #rect()
+ Melon

Enumeration items can contain multiple paragraphs and other block-level content. All content that is indented more than an item’s marker becomes part of that item.

2 Likes