#Numbering nested lists with non latin characters
34 messages · Page 1 of 1 (latest)
?r
#set enum(numbering: "1.α)", full: true)
+ first item
+ first subitem
+ second subitem
+ second item
full: true makes a difference here. Now this might not be exactly the desired result
I think it works as it is. Either use full: true or full: false
damn is there seriously no way to remove the apostrophe (without a custom func #set enum(numbering: (..ns) => numbering(sym.alpha, ..ns).slice(0, -2)))
Thank you but there is a problem : if you try with some other non latin scripts like bengali, the result is strange !
?r
#set enum(numbering: "1. অ)", full: true)
- one
- a
- b
- two
No , there is a difference for some scripts.
?r You need to use a code block to trigger the rendering.
#set enum(numbering: "1. অ)", full: true)
+ one
+ a
+ b
+ two
Huh. Typst Renderer bot lacks support for those characters.
I don't see that character mentioned in numbering documentation. Are you sure it is supported as a counting symbol? Docs say this
Counting symbols are 1, a, A, i, I, α, Α, 一, 壹, あ, い, ア, イ, א, 가, ㄱ, *, ١, ۱, १, ১, ক, ①, and ⓵. They are replaced by the number in the sequence, preserving the original case.
If it's not in the list, then it's unfortunately not supported. The package numberingx supports a few more scripts and numbering systems
Wikipedia says that ক is a bengali symbol, so that would be the only hope(?) The result with অ is indeed consistent with it just being treated as a constant string, not a numbering symbol
Thank you so much. I thought any supported alphabet could be used for counting like the ones you mentionned !
Is there a way to define custom labels for items (say from a list or by their unicode # for example) ?
Do you have an example? I'm not sure what it means
I want to use counting symbols that are not supported by the numbering function for example :
#let mylist [ا,ب,ج,د,ه,و,ز]
Is there a way to do something like
#set enum(numbering: mylist)
sure, numbering can be a function and the function receives an index or an array of indexes like 1 or (1, 1). So you just need a function to translate the number to the symbol
?r
#let nn = ("ا","ب","ج","د","ه","و","ز")
#set enum(numbering: i => nn.at(i - 1)) // XX need to handle wraparound
+ first
+ second
+ third
I get this message : expected string, found integer
(Just after the parenthesis in nn.at(...) )
then you have the same problem that I had first
need () for an array ([] is for a markup block)
as you can see the code above works (after edits)
Thank you !
Is there a way to automate this for second level lists ?
I don't know, maybe with some smart function writing
Okay, another question please : how to increase space (indentation) before items in a list ?
It's this parameter https://typst.app/docs/reference/model/enum/#parameters-body-indent
Thank you !
A last question ☺️ : how to add a closing parenthesis or a dot to each custom label ?
I think you can add it in the numbering function, like just + ")"
Thank you so much !
With your help, I've just finished my first typst document 🙂