Am 15.10.24 um 21:37 schrieb juh+ntg-context--- via ntg-context:
Am 15.10.24 um 17:16 schrieb Hans Hagen via ntg-context:
local sum = string.format("%0.2f", (0.3 * 100))
Gives 30.00
how do I get 30,00
local sum = string.formatters["%0.2M"](0.3 * 100)
Thanks a lot, Hans.
I can't find "string.formatters" and the format string %0.2M online or in the Lua-Manual. Any hint where I can find more about this? As commas as decimal separator might be a common wish, I would like to document it somewhere in the Wiki, if I could find some context.
For decimal comma in \unit and \digits, see https://wiki.contextgarden.net/Command/setupunit [method=1] % or 3 and \setdigitmode{1} which is not documented (apparently missing in interface, at least in the wiki version). Hraban