Katex: support \SI and \si from siunitx

Created on 22 Aug 2017  路  5Comments  路  Source: KaTeX/KaTeX

enhancement

Most helpful comment

The benefit of this package is that you can obtain unified style of units across the pages, the spacing is always determined automatically, and the document becomes more semantic.
Also it allows to write something like \SI{2.04e6}{\metre\per\second} , which renders like $ 2.04 \times 10^6 \text{m \, s}^{^1} $

I do want this function available for KaTeX too.

All 5 comments

@samridhgupta is \per any different from /?

Apparently it does. From the docs for the siunitx package:

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

results in

kg m/(A s)

is there any progress?

None yet. This is tricky because the non-optional argument to \si requires custom parsing in order for \per\ampere\per\second to be combined into /(A s).

I'm curious about the benefits of this package. It seems like it'd be easier to type:

\text{kg\,m/(A\,s)}

than

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

The benefit of this package is that you can obtain unified style of units across the pages, the spacing is always determined automatically, and the document becomes more semantic.
Also it allows to write something like \SI{2.04e6}{\metre\per\second} , which renders like $ 2.04 \times 10^6 \text{m \, s}^{^1} $

I do want this function available for KaTeX too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trollanfer picture trollanfer  路  5Comments

StaloneLab picture StaloneLab  路  3Comments

jason-s picture jason-s  路  3Comments

oddhack picture oddhack  路  3Comments

OisinMoran picture OisinMoran  路  4Comments