Skip to content

Spacing between list elements only works for top sublist element #5510

@DTAG-lnu

Description

@DTAG-lnu

Description

I am working with Touying to make lecture slides, but I believe this to be a general problem with lists. I have posted the problem in the forum and user miles-1 also agrees that this might be a problem in Typst. The problem is that when I set the spacing for lists with the following code:

#set list( spacing: 1.2em, )

It only applies the spacing, as it seems, to the first subitem. The rest of them are spaced out with a larger (default) spacing. This can be seen in this image:
Skärmbild från 2024-11-25 15-21-48

I have set up an example in the reproduction URL where I also, with the help of user miles-1, done an example at the end where the position of the spacing is shown to be put differently by using the code below:

#show list.item: it => { show [ ].func(): [SPACE IN LIST HERE] it }

He, and I think so too, believe that this shows the unexpected behaviour as the text "SPACE IN LIST HERE" is clearly in different places.

I hope this is something that someone can continue to work on or explain if it is the intended behaviour.

Reproduction URL

https://typst.app/project/rxAaN1fm8jJuAmo80Adcwm

Operating system

Web app, Linux

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayoutRelated to the layout category, which is about composing, positioning, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions