I have started using typst recently. Coming from LaTeX, compilation speeds are unbelievable. As a long time LaTeX user, I find some things simple, and some not.
I am primarily interested in using typst to prepare some books in Kannada. Everything (almost) works fine. But I want to get the page numbers as kannada numerals, not arabic.
How do I get page numbers in kannada for the main matter? Curently, the frontmatter of the books has roman page numbers and mainmatter has it in arabic numerals.
// The same numbering function can be use for lists as for page numbers
#import "@preview/numberingx:0.0.1"
#set enum(full: true, numbering: numberingx.formatter(
"{kannada}"
))
+ 1
+ 2
+ 3
+ 4
+ 5
Since the numberingx package hasn’t been updated, if @gezepi’s function does the same thing, might as well use that one?
You should set heading(numbering: function here), so use the numbering support on each element to configure numbering. The only change is that heading numbering is hierarchical while page numbering (normally) uses only one number.
A numbering function takes several arguments - the value from the counter - something like 1, 2, 3 and translates that to a number like 1.B.3 (using numerals and separators as defined by the numbering pattern or numbering function)
If you are modifying/stepping the heading counter yourself it’s already a bit more complicated than it should be, and maybe you need to continue adding custom code. But counter(heading).display() should pick up the heading.numbering setting automatically - at least you have that.