4

I'd like to align the word "ammontare" in the center of the column with an S tabular environment but I'm not able to do this even with \multicolumn. Any ideas? I'm sorry for the simple question but I'm new to latex. Thanksenter image description here

\begin{table}
\centering
\caption{Risultati dell'analisi di portafoglio con prestiti in corso}
\begin{tabular}{p{5cm}SS}
\toprule
Soglia      & {\makecell[ll]{Ammontare}} & {\makecell[ll]{Percentuale (\%)}}     
\\ 
\midrule
Capitale            & 634042875         & 100.00    \\
EL - $\sigma$       & 18053730          & 2.84          \\
EL                  & 22997024          & 3.62          \\
EL + $\sigma$       & 27940318          & 4.40          \\
95esimo percentile  & 31967180          & 5.04          \\
99esimo percentile  &  37032052         & 5.84  \\
\bottomrule
\end{tabular}
\label{tab:portfolioresultscurrent} 
\end{table}
5

With no table-format give, siunitx is using the 'centre the decimal marker' strategy. That works in all cases in the sense no boxes are overfull, but here with no decimal part leaves a lot of blank space. You need to give the package a 'clue':

\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\begin{document}

\begin{tabular}{p{5cm}S[table-format = 9]S[table-format=3.2]}
\toprule
Soglia      & {Ammontare} & {Percentuale (\%)}     
\\ 
\midrule
Capitale            & 634042875         & 100.00    \\
EL - $\sigma$       & 18053730          & 2.84          \\
EL                  & 22997024          & 3.62          \\
EL + $\sigma$       & 27940318          & 4.40          \\
95esimo percentile  & 31967180          & 5.04          \\
99esimo percentile  &  37032052         & 5.84  \\
\bottomrule
\end{tabular}

\end{document}

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.