Repository navigation
Switch to term-list-like impl for list - #4541
Enter-tainer wants to merge 1 commit into
Conversation
| item.body.clone().styled(ListElem::set_depth(Depth(1))), | ||
| locator.next(&item.body.span()), | ||
| )); | ||
| let pad = body_indent + indent; // TODO: plus marker width |
There was a problem hiding this comment.
I think i need to measure the width of marker here. But I haven't figure out how to do it.
There was a problem hiding this comment.
This looks strange, but also happens in term list and normal text. I'm not sure if this is intented or not
There was a problem hiding this comment.
For some reason markers don't change depending on depth. I haven't figure out why. Help 🆘
|
I made a more comprehensive attempt at https://github.com/typst/typst/tree/better-lists, which updates all list kinds to behave more like in LaTeX. The changes are similar to these ones, but make some different implementation choices, adjust the settable properties to the new model, and include the necessary measurement code. Code#set list(marker: [--])
#lorem(8)
- #lorem(5)
- Lorem
+ A
+ B
+ C
/ Hello: #lorem(8)
/ World: LoremAs the tests indicate, it still has things we need to think through though, particularly with block-level content directly after the marker, which will produce a parbreak: - #rect() |
|
hi, wondering if there is any updates on better lists branch. |
|
Unfortunately no. It's pretty difficult to express lists with existing layout constructs, so that inline & block content works as expected, baseline alignment is respected, etc. We might need to write a custom list layouter. |
|
Just wanted to follow up and ask if there are any new updates on the In the meantime, the community has created a great package, itemize, which serves as an effective temporary solution. However, this shouldn't be a long-term fix. Looking forward to future progress on this. Thanks for all your hard work! |


fix #4126 fix #1204