Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

why the numbers indicated from the arrows are not aligned compared to the columns above ?

enter image description here

\documentclass[border=10.0mm]{standalone}

\usepackage{booktabs,caption}

\usepackage{siunitx}

\sisetup{%
         output-decimal-marker={,}%
        }



\begin{document}
\begin{tabular}{*{4}{S}}
\toprule
{Distanza} & {$p$-$q$} & {$f$}  & {$f$} \\
{(mm)}     & {(mm)}    & {(mm)} & {(\%)} \\
\midrule
200        & 100       & 193,5  & 96,7 \\
           & 660       & 197,0  & 98,0 \\
           & 592       & 195,3  & 97,7 \\
\cmidrule(rl){1-4}
150        & 320       & 144    & 96 \\
           & 424       & 147    & 98 \\
           & 150       & 144    & 96 \\
\cmidrule(rl){1-4}
100        & 940       & 100    & 100,0 \\
           & 884       & 974    & 97,4 \\
           & 292       & 955    & 95,5 \\
\bottomrule
\end{tabular}
\end{document}
share|improve this question

1 Answer 1

up vote 13 down vote accepted

The standard settings for siunitx centre the decimal marker, but if there is no decimal marker at all in some numbers you will get a slight offset. The recommended method for using siunitx is to set the table-format appropriately for each table

\sisetup{table-format = 3.1}

as this allows the package to revise the correct space and also deals with numbers without decimal markers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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