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

Improve siunitx support #6658

Closed
jgm opened this issue Sep 2, 2020 · 11 comments
Closed

Improve siunitx support #6658

jgm opened this issue Sep 2, 2020 · 11 comments

Comments

@jgm
Copy link
Owner

jgm commented Sep 2, 2020

Here are some examples from the documentation:

\num{12345,67890}

\num{1+-2i}

\num{.3e45}

\num{1.654 x 2.34 x 3.430}

\si{kg.m.s^{-1}}

\si{\kilogram\metre\per\second}

\si[per-mode=symbol]{\kilogram\metre\per\second}

\si[per-mode=symbol]{\kilogram\metre\per\ampere\per\second}


\numlist{10;20;30}

\SIlist{0.13;0.67;0.80}{\milli\metre}

\numrange{10}{20}

\SIrange{0.13}{0.67}{\milli\metre}

\ang{10}

\ang{1;2;3}

\ang{;;1}

\ang{+10;;}

\ang{-0;1;}

\si{kg.m/s^2}

\si{g_{polymer}~mol_{cat}.s^{-1}}

\si{\kilo\gram\metre\per\square\second}

\si{\gram\per\cubic\centi\metre}

\si{\square\volt\cubic\lumen\per\farad}

\si{\metre\squared\per\gray\cubic\lux}

\si{\henry\second}

They render as follows:
Screen Shot 2020-09-02 at 11 14 08 AM

jgm added a commit that referenced this issue Sep 2, 2020
@jgm
Copy link
Owner Author

jgm commented Sep 2, 2020

Still need numlist and some spacing issues.

@jgm
Copy link
Owner Author

jgm commented Sep 2, 2020

And \ampere

jgm added a commit that referenced this issue Sep 3, 2020
@jgm
Copy link
Owner Author

jgm commented Sep 3, 2020

need to add tests and fix spacing.

@tarleb
Copy link
Collaborator

tarleb commented May 20, 2021

Related: #6620.

@jgm
Copy link
Owner Author

jgm commented May 20, 2021

Current renderings of the above examples:
Screen Shot 2021-05-20 at 8 20 46 AM

@jgm
Copy link
Owner Author

jgm commented May 20, 2021

To fix

  • \num{1+-2i} should have plus-or-minus symbol instead of +-
  • \si{\kilogram\metre\per\second} (without per-mode=symbol) should use exponent -1 instead of /
  • \num{.3e45} should have a leading 0.
  • \si[per-mode=symbol]{\kilogram\metre\per\ampere\per\second} should be kgm/(A s) not kgm/A/s
  • \SIlist{0.13;0.67;0.80}{\milli\metre} doesn't render at all!
  • \ang{+10;;} should not have the + sign
  • \si{\kilo\gram\metre\per\square\second} should render with negative exponent instead of /
  • \si{\gram\per\cubic\centi\metre} (a) should use negative exponent instead of slash, (b) splits up "cm" and puts the exponent on c

Some others have discrepancies which will be fixed if these are.

@krtko1
Copy link

krtko1 commented Aug 28, 2023

Hi.
Why is this issue closed when this feature is not implemented?

  • \si[per-mode=symbol]{\kilogram\metre\per\ampere\per\second} should be kgm/(A s) not kgm/A/s

@jgm
Copy link
Owner Author

jgm commented Aug 28, 2023

Maybe just an oversight? Probably best to open a new issue for this.

@jiucenglou
Copy link

Could this be made to work for tex->docx or md->docx ?

@krtko1
Copy link

krtko1 commented May 24, 2024

probably add new issue for it.

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

No branches or pull requests

5 participants
@jgm @tarleb @krtko1 @jiucenglou and others