![siunitx: Wie kann ich eine Tabelle fett, ausgerichtet und getrennt gestalten?](https://rvso.com/image/330750/siunitx%3A%20Wie%20kann%20ich%20eine%20Tabelle%20fett%2C%20ausgerichtet%20und%20getrennt%20gestalten%3F%20.png)
Ich habe die folgende Siunitx-Tabelle:
\sisetup{separate-uncertainty=true}
\begin{tabular}{
l
S[table-format=6.0, table-figures-uncertainty=5]
S[table-format=6.0, table-figures-uncertainty=5, detect-weight]
S[table-format=2.0]
S[table-format=1.2, detect-weight]
}
\toprule
{algorithm} & {$1$-ply} & {$3$-ply} & {\# $n$-tuples} & {time [days]}\\
\midrule
42-33 (baseline) & 265435\pm8511 & 393289\pm26496 & 5 & 2.35 \\
42-33, CS & 258616\pm5784 & 432701\pm13005 & 5 & 2.78 \\
42-33-4-22, CS & 263156\pm27722 & 464836\pm15941 & 10 & \bfseries 4.63 \\
42-33-4-22-3 & 319433\pm2708 & 469779\pm10920 & 12 & 5.06 \\
42-33-4-22-3, CS & 314013\pm7587 & 491398\pm19458 & 12 & 5.47 \\
\bottomrule
\end{tabular}
Ich konnte 4.63 fett und ausgerichtet machen, möchte aber auch einige Zellen der zweiten oder dritten Spalte fett und ausgerichtet machen. \bfseries
funktioniert bei ihnen nicht. Wie geht das?
Antwort1
Sie müssen \robustify
den \bfseries
Befehl wie beschriebenHier. Dann funktioniert es für jede S
Spalte.
\documentclass[border=2mm]{standalone}
\usepackage{etoolbox}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{separate-uncertainty=true}
\begin{document}
\robustify\bfseries
\begin{tabular}{
l
S[table-format=6.0,table-figures-uncertainty=5]
S[table-format=6.0,table-figures-uncertainty=5, detect-weight]
S[table-format=2.0]
S[table-format=1.2,detect-weight]
}
\toprule
{algorithm} & {$1$-ply} & {$3$-ply} & {\# $n$-tuples} & {time [days]}\\
\midrule
42-33 (baseline) & 265435(8511) & 393289(26496) & 5 & 2.35 \\
42-33, CS & 258616(5784) & \bfseries 432701(13005) & 5 & 2.78 \\
42-33-4-22, CS & 263156(27722) & 464836(15941) & 10 & \bfseries 4.63 \\
42-33-4-22-3 & 319433(2708) & 469779(10920) & 12 & 5.06 \\
42-33-4-22-3, CS & 314013(7587) & 491398(19458) & 12 & 5.47 \\
\bottomrule
\end{tabular}
\end{document}