# Typesetting image scale in SI units using the siunitx package

I use the siunitx package to consistently typeset units in my thesis. One particular typesetting format I'm interested in is the format of scales.

Let's say I'm describing a 5-by-5µm image. I fiddled around with the commands and found that I can do the following \SI{5x5}{\micro\meter}. This command, however, displays the scale as 5 µm x 5 µm.

I'd like to change the behavior of the package to display the units only once, as in "5x5 µm", as it is more compact and avoids the repetition of the unit in the text.

Is there an option or alternate syntax command that I should use?

-
Mathematically this is not really correct. Units are parts of the number, so if you have a 5\um x 5 \um image, you have a 25\um^2 surface and not a 25\um length. Maybe you need product-units=power as option of the \SI macro. –  R. M. Sep 30 '12 at 14:19
Sorry. Joseph Wright and sebschub preceded me. =) –  R. M. Sep 30 '12 at 14:20
Actually, according to the Chicago Manual of Style section 8.11, both 5µm x 5µm and 5x5 µm are acceptable abbreviations of the phrase five micrometer by five micrometer. I found no mention of 5x5µm2. Therefore, I'll stick with product-units = single –  Kpantzas Oct 2 '12 at 7:57

You want the product-units option

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\SI[product-units = single]{5x5}{\um}
\end{document}


(Note: this is mathematically questionable as it's the product of an integer and a length, not the product of two lengths.)

-
@Kpantzas I totally agree with Joseph especially because that's your thesis and it should be mathematically correct, product-units=power seems to me the best option for your case. –  sebschub Sep 30 '12 at 14:04
@Joseph Wright Thanks for the answer. Now that you point the mathematical conundrum out, I do agree with you, but only in principle. I'm still convinced that 5x5µm avoids a repetition and, therefore, is preferable in terms of technical writing style. I will check in the Chicago Manual of Style before applying the change though. –  Kpantzas Sep 30 '12 at 14:23
@Kpantzas The reason for having siunitx settings is precisely so you can make this decision in a flexible way. If you use \sisetup{product-units = single} in your preamble, and later change your mind, it's easy to re-insert the units. –  Joseph Wright Sep 30 '12 at 14:43
@JosephWright Thanks for the suggestion! I've decided to go with \sisetup{product-units = power} for the thesis. Although, I do agree that, mathematically speaking, the default setting is the only correct answer. Great package btw. –  Kpantzas Sep 30 '12 at 15:40

You could also use the \si macro, instead of the \SI macro, to typeset just the unit part of the expression:

{5$\times$5}\,\si{\micro\meter}


However, I agree with Joseph Wright that this form of expressing a scale is mathematically questionable.

-