24

I get 1.0 Nm. But how to get 1.0 N.m

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\SI{1.0}{\newton\meter}\\
1.0~N$\cdot$m
\end{document}

enter image description here

2 Answers 2

36

inter-unit-product is an available option and described in the documentation. To get correct spacing you should use ${}\cdot{}$. However I prefer a tighter spacing by $\cdot$.

\documentclass{article}
\usepackage{siunitx}
\parindent0pt
\begin{document}
\SI[inter-unit-product =$\cdot$]{1.0}{\newton\meter}\\
\SI[inter-unit-product =${}\cdot{}$]{1.0}{\newton\meter}\\
$1.0\,\mathrm{N}\cdot\mathrm{m}$
\end{document}

enter image description here

To set his behavior for the whole document you can specify the option via \sisetup

\sisetup{inter-unit-product =$\cdot$}
6
  • 3
    I want this setting for whole document.
    – sandu
    Jun 8, 2012 at 8:53
  • 3
    @sandu: \sisetup{inter-unit-product =$\cdot$} Jun 8, 2012 at 8:54
  • 2
    @MarcoDaniel One should use \si[inter-unit-product = \ensuremath{{}\cdot{}}] to get the corrected spacing. Apr 10, 2013 at 12:57
  • Setting this behaviour for the whole document directly at the package call is done without the math typesetting $-symbols: \usepackage[inter-unit-product =\cdot]{siunitx}
    – Steeven
    May 11, 2017 at 7:15
  • @SvendTveskæg Sorry for being late to the party. Could you explain how one can know what is the "correct" spacing for any situation? I find it hard to try answer some basic questions I have an resort to posting questions here because some people argue that approach B is better than approach A because it have "correct" spacing but I do not know what is the correct spacing for a given situation? Thanks in advance btw
    – Jorayen
    Nov 6, 2020 at 15:23
10

Sorry for the zombie reply, but aren't the units typeset in math mode? In that case:

\SI[inter-unit-product =$\cdot$]{1.0}{\newton\meter}

won't compile. You should use:

\SI[inter-unit-product =\ensuremath{\cdot}]{1.0}{\newton\meter}

instead.

2
  • 2
    This is already covered in the other answer (to some extent).
    – Werner
    Mar 1, 2016 at 19:04
  • In the recent siunitx major update from version 2 to version 3, the \SI command has changed to \qty command. And you can still use the old commands, the author says "Where possible, older names are mapped to newer ones internally: you will be warned in the log if this is the case."
    – Gordon Bai
    Jul 5, 2021 at 15:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .