# Siunitx without unit macros

The siunitx manual states in Ch. 3:

The unit system can interpret units given as text to be used directly or as macro- based units. In the latter case, different formatting is possible.

To give units directly as text works for simple cases like \SI{4}{kg}, but I didn't find any further documentation of how the syntax is parsed if one wants to give units directly as text and not as macros.

For example one might wish that \SI{4}{m/s^2} gives the same result as \SI{4}{\m\per\second\squared}. Using \SI{4}{\frac{m}{s^2}} seems to give the correct result, but I am not sure, if this is a correct way to use it. So is there any further documentation or explanation of how to give units more diretly without using the units macros?

The is no parsing when 'literal' unit input is used. Instead, a small number of substitutions/adjustments are made:

• . and ~ represent inter-unit products
• ^ can be used for superscripts
• _ can be used for subscripts
• Text is printed upright
• Superscripts can be handled using the 'unit' or 'number' font setting

With the standard settings, siunitx sets units in math mode and so uses \mathrm. This will allow \frac as it's math mode syntax. If you use mode = text then _ and ^ still work (due to the substitutions) but things like \frac will not.

The 'literal' unit mode is essentially the same as that in sistyle.

• More or less a re-hash of the manual, page 6 in the current release. – Joseph Wright Apr 25 '17 at 15:55