[Tex/LaTex] dot between units with SIunitx

siunitx

I can not understand when SIunitx places a point between units.
in the examples below, why is there no point between \ kilogram and \ meter ^ 2 whereas there is one between \ newton and \ meter?

How to homogenize the writing of units?

PS: I also find that the space between the point and the units is too important, how to reduce it?

% !TeX encoding = utf8
% !TeX spellcheck = fr

% !Tex program = Xelatex + shell-escape

\documentclass%
[%
paper=a4
,fontsize=11pt % common are 10, 11 or 12
,headings=normal
%,parskip
,numbers=noendperiod % 2.3.1 vs 2.3.1. (no dot after the last chapter number)
,twoside=true
,toc=bibliography % Bibliography appears in Table of Contents (without a number)
,toc=listof % List of Figures and List of Tables appear in Table of Contents
,version=last % Use latest version of the KOMA-Script
,enabledeprecatedfontcommands
,div=18
]%
{scrbook}

\usepackage{fontspec}

\usepackage{mathpazo}
\setmainfont
     [ BoldFont       = texgyrepagella-bold.otf ,
       ItalicFont     = texgyrepagella-italic.otf ,
       BoldItalicFont = texgyrepagella-bolditalic.otf ]
     {texgyrepagella-regular.otf}


\usepackage[french]{babel} 

\usepackage{tikz}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,},group-minimum-digits=4,abbreviations}
\sisetup{inter-unit-product=\ensuremath{{}\cdot{}}}

\begin{document}
\SI{100}{\metre\per\second}
\SI{100}{\newton\metre\second\tothe{-2}}
\SI{100}{\newton\metre}
\SI{100}{\kilogram\metre^2}
$\SI{100}{\kilogram\metre\tothe{2}}$
\end{document}

Best Answer

The siunitx package works in two 'modes': one where all units are given as macros, and the second when there is literal material in the unit. In the latter case, formatting is extremely limited: it's simply not possible to do the kind of processing that is doable with macro-based units. When you add ^2 rather than \squared, you are forcing 'literal mode' and the package cannot add inter-unit information.