enum
ShowableShowable functions can be customized with show
rules.
show
rules.A numbered list.
Displays a sequence of items vertically and numbers them consecutively.
Example
Automatically numbered:
+ Preparations
+ Analysis
+ Conclusions
Manually numbered:
2. What is the first step?
5. I am confused.
+ Moving on ...
Function call.
#enum[First][Second]

You can easily switch all your enumerations to a different numbering style with a set rule.
#set enum(numbering: "a)")
+ Starting off ...
+ Don't forget step two

Syntax
This functions also has dedicated syntax:
- Starting a line with a plus sign creates an automatically numbered enumeration item.
- Starting a line with a number followed by a dot creates an explicitly numbered enumeration item.
Enumeration items can contain multiple paragraphs and other block-level content. All content that is indented more than an item's plus sign or dot becomes part of that item.
ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
items
contentPositionalPositional parameters are specified in order, without names.VariadicVariadic parameters can be specified multiple times.
The enumeration's children.
When using the enum syntax, adjacent items are automatically collected into enumerations, even through constructs like for loops.
#for phase in (
"Launch",
"Orbit",
"Descent",
) [+ #phase]

start
Which number to start the enumeration with.
#enum(
start: 3,
[Skipping],
[Ahead],
)

tight
If this is false
, the items are spaced apart with
enum spacing. If it is true
, they use normal
leading instead. This makes the enumeration more
compact, which can look better if the items are short.
+ If an enum has a lot of text, and
maybe other inline content, it
should not be tight anymore.
+ To make an enum wide, simply
insert a blank line between the
items.

numbering
How to number the enumeration. Accepts a numbering pattern or function.
If the numbering pattern contains multiple counting symbols, they apply
to nested enums. If given a function, the function receives one argument
if full
is false
and multiple arguments if full
is true
.
#set enum(numbering: "1.a)")
+ Different
+ Numbering
+ Nested
+ Items
+ Style
#set enum(numbering: n => super[#n])
+ Superscript
+ Numbering!

full
booleanSettableSettable parameters can be customized for all following uses of the function with a set
rule.
set
rule.Whether to display the full numbering, including the numbers of all parent enumerations.
Defaults to false
.
#set enum(numbering: "1.a)", full: true)
+ Cook
+ Heat water
+ Add integredients
+ Eat

indent
lengthSettableSettable parameters can be customized for all following uses of the function with a set
rule.
set
rule.The indentation of each item's label.
body-indent
lengthSettableSettable parameters can be customized for all following uses of the function with a set
rule.
set
rule.The space between the numbering and the body of each item.
spacing
autorelative lengthfractionSettableSettable parameters can be customized for all following uses of the function with a set
rule.
set
rule.The spacing between the items of a wide (non-tight) enumeration.
If set to auto
, uses the spacing below blocks.