4

I read a lot of post on this subject but none of the answers worked for me. I would like to modify the space before and after the \cdot between units. Surprisingly the following code doesn't work. Do you know what's wrong ?

\documentclass{article}
\usepackage{siunitx}
\sisetup{inter-unit-product=\cdot,tight-spacing=true}

\begin{document}
   \si{\watt.\metre^{-2}}
\end{document}

I also tried :

  • This \sisetup{inter-unit-product={}\cdot{}}
  • And this \sisetup{inter-unit-product=\vspace*{-1mm}\cdot\vspace*{-1mm}}
6

tight-spacing is irrelevant here. If you don't want space around the centered period, use braces:

\documentclass{article}
\usepackage{siunitx}

\sisetup{
  inter-unit-product=\ensuremath{{\cdot}},
%  tight-spacing=true,
}

\begin{document}

\si{\watt.\metre^{-2}}

\sisetup{
  inter-unit-product=\ensuremath{\cdot},
}
\si{\watt.\metre^{-2}}

\end{document}

enter image description here

  • Arff... I tried the second but not the first (I couldn't find it by myself). I also tried \sisetup{inter-unit-product=\ensuremath{{}\cdot{}}} but it doesn't works too. Thanks for your answer @egreg. – kipgon Sep 12 '17 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.