Closed aszenz closed 2 months ago
Hi @aszenz ,
this sounds doable! Returning a plain string won't be possible because num
will become a type when user-defined types are available with Typst but returning content should be fine.
I think, the best idea, would be to add a boolean parameter math
to num
that can be configured via
#set-num(math: false)
Hi @aszenz ,
this sounds doable! Returning a plain string won't be possible because
num
will become a type when user-defined types are available with Typst but returning content should be fine.I think, the best idea, would be to add a boolean parameter
math
tonum
that can be configured via#set-num(math: false)
Sounds good, will that resolve the styling issues, I'm assuming content will be styled the same as the rest of the text in the document.
Yes, in the current draft it looks like this:
#set text(font: "Allura")
Default mode: #num[234,3]
#set-num(math: false)
No math: #num[234,3]
Hi @aszenz ,
this is now available by the way (import "@preview/zero:0.2.0"
)
Hi @aszenz , this is now available by the way (
import "@preview/zero:0.2.0"
)
Thanks I'm already using, great work!!
I'm using this library for formatting numbers like amounts and quantities in an Invoice without using scientific numbering, currently the numbers are shown differently (font) since they are rendered in math mode.
It is difficult to override math styles and keep them in sync with other text styles, so it would be great if the library provided a way to render the output as just text