ChHecker / unify

Format numbers, units, and ranges in Typst correctly.
MIT License
23 stars 17 forks source link

Allow spaces as `num` thousand separators #32

Open genericusername3 opened 4 months ago

genericusername3 commented 4 months ago

Currently, separators for num are trimmed, meaning it is not possible to set e.g. " " or sym.space.nobreak or sym.space.nobreak.narrow as the thousands separator, which is inconvenient for formatting a number like e.g. 4446536 as 4 446 536

ChHecker commented 3 months ago

That's an interesting point. A quick intermediate fix would be using the #h command to specify a fixed space, this would however not automatically scale with the space width. As a permanent solution, removing the trimming of the separator probably makes sense.

genericusername3 commented 3 months ago

What i did so far was using a dummy unicode character and defining a show rule to replace that with a space, which is really a bit silly

On 14 July 2024 10:56:53 CEST, Christopher Hecker @.***> wrote:

That's an interesting point. A quick intermediate fix would be using the #h command to specify a fixed space, this would however not automatically scale with the space width. As a permanent solution, removing the trimming of the separator probably makes sense.

-- Reply to this email directly or view it on GitHub: https://github.com/ChHecker/unify/issues/32#issuecomment-2227271483 You are receiving this because you authored the thread.

Message ID: @.***>