johanvx / typst-undergradmath

A Typst port of undergradmath
Creative Commons Attribution Share Alike 4.0 International
106 stars 7 forks source link

Spacing between values and units #17

Open Myriad-Dreamin opened 1 year ago

Myriad-Dreamin commented 1 year ago

The problem is not what I care, but I read your README and I knew it from my knowledge.

The Thin space (in Typst, it is represented by\u{2009}) can be used for space between numbers and SI units. To use it, we can define some functions for Typst similar to those available in siunitx.

This is still a unicode trick, but works in Typst...

Reference:

johanvx commented 1 year ago

Thanks for your knowledge sharing!

I was thinking about doing some trick with Unicode spaces, but soon realized that it would be too much for this project.

I'll leave this issue open until there's a non-tricky way to improve this. Hopefully this value-unit feature will be officially supported.

Myriad-Dreamin commented 11 months ago

World changes rapidly. There is already a package dedicated to typesetting unit text, metro. It is not quite mature but deserves to mention in the document. @johanvx @fenjalien

johanvx commented 11 months ago

World changes rapidly. There is already a package dedicated to typesetting unit text, metro. It is not quite mature but deserves to mention in the document. @johanvx @fenjalien

Yeah, metro is great and so is unify.

I am a bit hesitant to use packages as they are still experimental.

Myriad-Dreamin commented 11 months ago

I am a bit hesitant to use packages as they are still experimental.

Could I ask the consideration here? The @preview namespace for packages is reserved forever to the current experimental package resolution as far as I know, so you're not worried to get document broken in future.

johanvx commented 11 months ago

Could I ask the consideration here?

Honestly, the only reason is that I don't like the @preview namespace 😆 . Apart from this, I do love to use packages in the document.