#Numbering with different styles and consistent spacing

1 messages · Page 1 of 1 (latest)

small steeple
#

I'm trying to achieve the attached output style. I've had a look at the tutorial and tried things like this:

#set heading(numbering: "1.")
#set enum(numbering: "(a) (i) (I)")

= Heading
== This should be at enum at level 1, but the only way I can get it to work is as a heading. 
+ This would be level 2.
+ As would this. 
    + This should be level 3
    + As should this. 
        + I would not go deeper than level 4. 

As above, this only works if i use a heading as the 1.1 list entry, but this doesnt feel right, as it's not really a heading? There are also situations where I might need to have an indented block that appears under 1.1 but without a number and this setup doesnt work.

Aside from the above I also cant figure out how to set the spacing between the numbering and the text to achieve a consistent style as shown in the attached pic. Can anyone help?

Thanks

exotic pier
#

Here is part of the solution, not sure about the spacing.

#

?r

#set heading(numbering: "1.")

#set enum(numbering: (..it) => context {
    if it.pos().len() == 1 {
      numbering("1.1", ..counter(heading).get(), ..it.pos())
    } else {
      numbering(("(a)", "(i)", "(A)").at(it.pos().len() - 2),it.pos().last())
    }
  }, 
  full: true
)

= Heading

+ This is a enum item at level 1. 
  + This would be level 2.
  + As would this. 
      + This should be level 3
      + As should this. 
          + I would not go deeper than level 4. 
+ This is level 1.

== Heading 2

+ This is a enum item at level 1. 
  + This would be level 2.
  + As would this. 
      + This should be level 3
      + As should this. 
          + I would not go deeper than level 4. 

= Heading
+ This is a enum item at level 1. 
  + This would be level 2.
  + As would this. 
      + This should be level 3
      + As should this. 
          + I would not go deeper than level 4.