1

Consider this example

\documentclass{report}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{l S}
   A & {sf}\\
   0 & 9887779.1\\
   0 & 9999.1 \\
\end{tabular}
\end{document}

In the output

enter image description here

the column head is centred on the decimal point. How to centre the column head in the middle of the column?

2

Adding the vertical lines can tell you why this happens (don't add vertical lines in your actual document!). The following screenshots are taken in the same scale to the actual PDF file.

enter image description here

enter image description here

It is using [table-format=7.7]. You have to change it to [table-format=7.2]:

\documentclass{report}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{l S[table-format=7.2]}
   A & {sf}\\
   0 & 9887779.11\\
   0 & 9999.1 \\
\end{tabular}
\end{document}

enter image description here

With vertical lines added to highlight the "centerity":

enter image description here

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.