[Tex/LaTex] Thermal conductivity unit


I am trying to type the unit for thermal conductivity w/mK in my document using the siunitx package but I get the wrong output.

I'm writing \SI[per-mode = symbol]{113}{\watt\per\metre\kelvin} which should give me the output "113 W/mK" but it gives me "113 W K/m"

I have no idea why it does this fliparound but it annoys me to death!

Best Answer

The \per modifier applies to one unit unless you set sticky-per


\SI[per-mode = symbol]{113}{\watt\per\metre\per\kelvin}

\SI[per-mode = symbol, sticky-per]{113}{\watt\per\metre\kelvin}


Note that in this formulation brackets are needed to ensure that the nature of the division is correctly shown.

To understand why the standard settings expect a \per for each unit, it's important to bear in mind that with 'symbolic' input, siunitx parses the entire unit then constructs the output accordingly. Thus unlike the earlier SIunits package, \per doesn't just drop in a /.

Taking the example J mol^{-1} K{-1}, this is read in English as

joules per mole per kelvin

which is what inspires the notation \joule\per\mole\per\kelvin, where each inter-unit gap represents a multiplication of units. When written with a solidus, we need brackets in the demonstrator (J/(mol K)) as the alternative is mathematically incorrect (J/mol K = J K/mol).

As users want a variety of input forms, the package offers stick-per to allow for the 'one per to separate out the numerator and denominator' approach, hence allowing \si[sticky-per]{\joule\per\mole\kelvin} to work. However, this is still parsed into the same internal format as \si[sticky-per = false]{\joule\per\mole\per\kelvin}, and so will still add any brackets required to maintain mathematical meaning. That behaviour too can be altered using the bracket-unit-denominator setting, so in a document where you want 'SIunits-like' behaviour the appropriate set up might be

\sisetup{bracket-unit-denominator, per-mode = symbol, sticky-per}

(I would apply this on a whole-document basis.)

Note that when you use per-mode = symbol and have a reciprocal unit part-way through the input, siunitx reorders such that the / is correctly positioned based on the parsed units. That is perhaps clearer if you force fractional form

\SI[per-mode = fraction]{113}{\watt\per\metre\per\kelvin} =

Finally, siunitx allows the use of literal input (not everyone needs or likes parsed units)