# siunitx: How to hide a part of a number

I want to suppress a number in a \SI-command.

\documentclass{article}
\usepackage{siunitx,textcomp}
\sisetup{per-mode=symbol}
\begin{document}
current output: (\SI{{}e9}{\per\litre}) %

current output: (\SI{1e9}{\per\litre}) %

wanted output:  (\texttimes~10\textsuperscript{9}/l)

\sisetup{exponent-product = \cdot}

current output: (\SI{{}e9}{\per\litre}) %

current output: (\SI{1e9}{\per\litre}) %

wanted output:  ($\cdot$~10\textsuperscript{9}/l)

\end{document}


Is there any way to do it? I don't want to hard code with \texttimes as I don't know if the style of exponent-product will change in the future.

• Would (\si{{}\times 10^9\per\litre}) be acceptable? In effect, this method moves the \times 10^9 part from the numbers-part to the units-part of the full expression. – Mico Mar 29 '15 at 17:10
• @Mico: I had a similar idea, but what's the advantage of \si then? I think, Ulrike is after an automated typesetting of x some power of ten using the siunitx tools – user31729 Mar 29 '15 at 17:14
• @Mico: \times has the same problem then \texttimes: It doesn't change with changes of the exponent style through \sisetup. I edited the question to make it clearer. – Ulrike Fischer Mar 29 '15 at 17:25
• Unrelated, but you can type \SI{e9}{…} instead of \SI{{}e9}{…}, i.e. no need for the empty group. – Henri Menke Mar 29 '15 at 17:31
• Log a feature request with a good example of a use case from the published literature :-) – Joseph Wright Mar 29 '15 at 18:02

Whilst there is no built in mechanism for 'suppress part of a number' in general, one can (ab)use exponent-base here, for example

\documentclass{article}
\usepackage{siunitx,textcomp}
\sisetup{per-mode=symbol,}
\begin{document}
current output: (\SI{e9}{\per\litre}) %

wanted output:  (\texttimes~10\textsuperscript{9}/l)

\sisetup{exponent-base = \ensuremath{\mathrel{\times}10}}
current output: (\SI{e9}{\per\litre}) %

\end{document}


Of course, whether this approach is applicable or not depends on your requirements: it will work well in a case where you have grouping, for example.

• BTW, assuming the parenthetic term here is for something like a table header, I'm sure you know it is formally a division so just (10^{9}/l) or similar is correct. – Joseph Wright Mar 29 '15 at 17:41
• How about \num[explicit-sign=\@gobble]{1e9} (with \makeatletter)? Hacky, but currently works output-wise... (I think the idea was to use \times the same way as siunitx does, and not to repeat the definition.) – krlmlr Mar 29 '15 at 17:43
• @krlmlr Only works if there is exactly one token following – Joseph Wright Mar 29 '15 at 17:47
• This still assumes that I know the current output of exponent-product. I'm more looking foe something like \printcurrentexponentproductpart\si{e9}{\per\litre}. So where is the symbol and the space stored? (I know that isn't standard output, but as it is wanted ...) – Ulrike Fischer Mar 29 '15 at 19:51