However it didn’t work as intended, since major-enum would be considered the same object as enum, and #set statements would be applied to them at the same time.
#let major-enum(..args) = enum(..args)
won’t work either, since spacing would not be considered as a named argument of major-enum, thus not settable.
Generally speaking, you can’t. But with enough hacks you can manually exploit one element for storing relevant/updated field values with a set rule, like here:
Hi. Thanks for your answer! The use case is to create a different style of enum for a very long enum spanning multiple pages, containing a few homework exercises. I don['t want this style to interfere with usual enums.
Have you tried just adding #[ at the start and ] at the end of the section with a normal set rule? This is the most straightforward way, with no hacking. Or #custom-enum[].
Yeah, that’s my problem: I wanted to provide a custom-enum, but I didn’t know the function.with(...) syntax, and there isn’t a dedicated documentation page for with.
EDIT: I looked for set in the documentations, but didn’t find it.