Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacing between values and units #17

Open
Myriad-Dreamin opened this issue Apr 12, 2023 · 5 comments
Open

Spacing between values and units #17

Myriad-Dreamin opened this issue Apr 12, 2023 · 5 comments

Comments

@Myriad-Dreamin
Copy link
Contributor

Myriad-Dreamin commented Apr 12, 2023

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.

  • Graphic designers are oftenly using "thin space" if the "space" is not good.
  • The default breaks between value and units is \u{2009} from siunitx-v2.sty
  • If there is a very long long long sentence, Typst will break a thin space, whill LaTeX will not. And, Typst follows the Unicode Standard.

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

Reference:

@johanvx
Copy link
Owner

johanvx commented Apr 12, 2023

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
Copy link
Contributor Author

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
Copy link
Owner

johanvx commented Sep 15, 2023

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
Copy link
Contributor Author

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
Copy link
Owner

johanvx commented Sep 15, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants