After searching for hours I could not solve my problem. I have a large table with means and sd separated in three columns. I need to three below columns to be centered on the +-.
I tried using S tables but when I use S type tables I receive an error message with the column header on two lines. Any other simple solution keeping the 3 column form of the mean +- sd.
Here is a short extract of the table.
\begin{table}[]
\begin{tabular}{|l|r|c|l|}
\textit{Acides gras (\%)} & \multicolumn{3}{c}{\begin{tabular}[c]{@{}c@{}}My long three column and two lines header to be centered \\ (n = 91)\end{tabular}} \\
\textit{Saturés} & & & \\
14:0 & 2.6 & ± & 0.7
\end{tabular}
\end{table}
! Edit
I am also there thank you ! Now my problem is that I need some rows to be in bold and when I use the bfseries in tblr only the first column is actually bold.
\begin{table}
\sisetup{mode=text, % <--
separate-uncertainty % <--
}
\centering
\begin{tblr}{colspec = { X[l] *{6}{X[c, si={table-format=2.1(2)}]} }, % < ---
colsep = 1pt,
hspan = minimal,
row{1} = {guard},
row{3} = {font=\bfseries}
}
\toprule
Acides gras (\%)
& \SetCell[c=3]{c} {My long three column and two lines header to be centered\\ ($n = 91$)}
& & & \SetCell[c=3]{c} {A shorter title\\ ($n = 91$)}
& & \\
\cmidrule[lr]{2-4}
\cmidrule[l]{5-7}
Saturés & & & & & & \\
14:0 & 2.6(0.7) & 1.8(0.7) & 2.2(0.6) & 6.9(0.7) & 4.3(1.7) & 3(0.8) \\
\end{tblr}
\end{table}
&
) between these two headers as your 2nd header spans three columns.