You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
List and enum markers are not aligned with the baseline of the item's contents #1204
But this will even center the bullet between multiple lines. Meaning, if there is a list item containing two lines of text, the bullet will be centered vertically in front of those two lines.
The same problem exists with enum, but there (to my knowledge) is no such hack, since I can't access the counter that is counting the enumeration. If someone knows how to do this, that would be appreciated. Also note, that #set enum(number-align: horizon) is disallowed for some reason.
A fix to this would also be very appreciated. (Also, loving typst so far).
Reacted by Naarakah, Nikita Paniukhin, Leon Martin, CGMossa, Bthxtly, Eric Ceglie, Buesra24 and memento mori
changed the title [-]Bullet point is not aligned with text at beginning of list item[/-][+]List and enum markers are not aligned with text at beginning of item[/+]on Apr 1, 2024
changed the title [-]List and enum markers are not aligned with text at beginning of item[/-][+]List and enum markers are not aligned with the baseline of the item's contents[/+]on Apr 8, 2024
Yeah, it's planned to change the internal implementation so something similar (though of course not using terms), possibly via #4541, maybe through another PR.
Reacted by OrangeX4, Andreas Kröpelin, Murphy Sünnenwold, Campbell He, CGMossa, Eric Ceglie and Michael Fortunato
I just encounter myself with this issue right now. As a simple Typst user is kinda weird for me to see that this issue was not addressed from day 1. So much time has passed since its opening. It is hard to believe that is not solved yet. I hope the team can fix it in a native way. I don't want to come back to Latex but this must be solved in order to keep the dignity lol.
Reacted by Joseph Alexander Wilson, Chaddaï Fouché, gbchu, Martí and Antoine Dequay
Reacted by Ernesto Martínez García, Andreas Kröpelin, randoragon, levavft, Pravin Bansal and Tobias Schmitz
However, the code is messy and some features, like indent, body indent, and rtl text, are not supported. I wish the official group can release their own improved implementation soon,
Reacted by Shen Fu, Michael Fortunato, 梦飞翔, Kevin Stephen and Ilya Yudaikin
Problem with above method is that it will force the list into blocks, which must start on a new line and cannot (to my knowledge) be embedded inline, so running lists are not possible,
They should take the above form, but take the below form:
Activity
N3xed commentedon Jun 23, 2023
Ran into this as well.
It is somewhat workaroundable with a bullet
list, by e.g.:But this will even center the bullet between multiple lines. Meaning, if there is a list item containing two lines of text, the bullet will be centered vertically in front of those two lines.
The same problem exists with
enum, but there (to my knowledge) is no such hack, since I can't access thecounterthat is counting the enumeration. If someone knows how to do this, that would be appreciated. Also note, that#set enum(number-align: horizon)is disallowed for some reason.A fix to this would also be very appreciated. (Also, loving typst so far).
[-]Bullet point is not aligned with text at beginning of list item[/-][+]List and enum markers are not aligned with text at beginning of item[/+][-]List and enum markers are not aligned with text at beginning of item[/-][+]List and enum markers are not aligned with the baseline of the item's contents[/+]StrangeGirlMurph commentedon Apr 24, 2024
Just for anyone who found this issue and is looking for a workaround. Someone smart on the Discord Server came up with this:
Enter-tainer commentedon Jun 4, 2024
I wonder if it will help if we don't use a grid when layouting enum/list/term. See LaTeX's enumitem's method:
https://www.texnia.com/archive/enumitem.pdf
crimestop commentedon Jun 6, 2024
For list with multi-line item, we should use the following code instead to get the correct height
Enter-tainer commentedon Jun 6, 2024
Kind reminder: all code posted aboved breaks nested list items. Like:
crimestop commentedon Jun 16, 2024
You may try this
Cannot do the same for enum because I seem to have no access to the function
apply_kththat appears in the source code of enumEnter-tainer commentedon Jun 16, 2024
I think it would make sense if we change how list is layouted within typst.
Enter-tainer commentedon Jun 16, 2024
see also #4126
scrouthtv commentedon Jul 22, 2024
Regarding @crimestop 's proposed solution, I'd suggest fixing the box's width to
100%in order to fixitems with centered content, such as equation:Example:
OrangeX4 commentedon Aug 24, 2024
I have a new way to solve this problem. I replaced list with terms, which solved the hanging-indent issue.
Example:
laurmaedje commentedon Aug 24, 2024
Yeah, it's planned to change the internal implementation so something similar (though of course not using terms), possibly via #4541, maybe through another PR.
1 remaining item
Fr4nk1inCs commentedon Oct 30, 2024
To adjust to the new behaviors of list's spacing, and the
contextexpression part:CreadorSW commentedon Mar 4, 2025
I just encounter myself with this issue right now. As a simple Typst user is kinda weird for me to see that this issue was not addressed from day 1. So much time has passed since its opening. It is hard to believe that is not solved yet. I hope the team can fix it in a native way. I don't want to come back to Latex but this must be solved in order to keep the dignity lol.
HPDell commentedon May 1, 2025
Hi,
I encountered this issues yesterday. Finally, I rewrite the way list and enum showing like this:
The function is tested by
And the output
However, the code is messy and some features, like indent, body indent, and rtl text, are not supported. I wish the official group can release their own improved implementation soon,
pacaunt commentedon May 26, 2025
Another alternatives for workarounds: This one also handle hanging indent, numbering with full enumeration and support native typst syntax.
pravinbansal-pt commentedon Jul 6, 2025
@pacaunt your solution for enum causes a
dxin the label, which is correct with the followingpravinbansal-pt commentedon Jul 11, 2025
Problem with above method is that it will force the list into blocks, which must start on a new line and cannot (to my knowledge) be embedded inline, so running lists are not possible,
They should take the above form, but take the below form:
Hopefully something @reknih is at least aware of!
tianyi-smile commentedon Jul 31, 2025
As a temporary solution, the package
itemizecan now be used.For example:
The source code is as follows:
(hopefully) temporary fix for the itemize bug (see typst/typst#1204 (…
flokl commentedon Aug 25, 2025
Because it wasn't mentioned yet, also lists that break over a page inside a table with align
horizonare affected in v0.13.1.