在此表中
\documentclass{IEEEtran}
\usepackage{capt-of}
\usepackage[dvipsnames]{xcolor}
\usepackage{tabularray}
\NewTblrTheme{captionof}%
{%
\DefTblrTemplate{caption}{default}%
{\addtocounter{table}{-1}%
\captionof{table}{\InsertTblrText{caption}}%
}
}
\definecolor{nl1}{RGB}{68, 119, 160}
\definecolor{nl2}{RGB}{102, 204, 238}
\definecolor{nl3}{RGB}{204, 187, 68}
\definecolor{nl4}{RGB}{238, 102,119}
\colorlet{l1}{nl2!70}
\colorlet{l2}{nl3!70}
\colorlet{l3}{nl4!70}
\colorlet{l4}{Gray!70}
\colorlet{lD1}{nl2!35}
\colorlet{lD2}{nl3!35}
\colorlet{lD3}{nl4!35}
\colorlet{lD4}{Gray!35}
\begin{document}
\begin{table}[ht]
\footnotesize
\begin{talltblr}[
theme = captionof,
caption = {Accuracy [\%]. Brown, green, blue, yellow fills indicate L1 to L4 layouts; the lighter tones of colors indicate dropout added to layout. Unfilled cells correspond to cases with ties.},
label = {tab:ACCTAB},
note{\textdagger} = {L1, L4, L1-D, L3-D},
note{\textdaggerdbl} = {L1, L3-D}
]{
hlines, vlines,
colspec = {Q[r] *{9}{X[c, m]}},
colsep=1.8pt,
row{1} = {font=\bfseries},
row{3} = {mode=math},
}
\SetCell[c=10]{c} {Basic model}
& & & & & & & & & \\
\SetCell[r=2]{c}
& \SetCell[c=3]{c} {Ideal}
& & & \SetCell[c=3]{c} {Simple}
& & & \SetCell[c=3]{c} {{{Complex}}}
& & \\
& d{=}2
& d{=}2.5
& d{=}3
& d{=}2
& d{=}2.5
& d{=}3
& d{=}2
& d{=}2.5
& d{=}3 \\
4 boxes
& \SetCell{bg=l1} 99.95
& \SetCell{bg=lD1} 99.7
& \SetCell{bg=lD1} 99.55
& \SetCell{bg=lD3} 99.5
& \SetCell{bg=lD3} 99.15
& \SetCell{bg=l1} 99
& \SetCell{bg=l1} 99.1
& \SetCell{bg=white}{99.1\TblrNote{\textdaggerdbl}\\2.3}
& \SetCell{bg=l4} 99.2 \\
8 boxes
& \SetCell{bg=l3} {85.35\\ 2.13}
& \SetCell{bg=l1} {85.15\\ 2.28}
& \SetCell{bg=l1} {79.1\\ 2.61}
& \SetCell{bg=l3} 78.75
& \SetCell{bg=lD2} 75.85
& \SetCell{bg=lD2} 76.75
& \SetCell{bg=lD2} 76.1
& \SetCell{bg=lD3} 76.2
& \SetCell{bg=l3} 76.05 \\
16 boxes
& \SetCell{bg=l3} {62.1\\ 4.69}
& \SetCell{bg=lD2} {65.2\\ 4.52}
& \SetCell{bg=l2} {60.55\\ 5.64}
& \SetCell{bg=l1} 53.5
& \SetCell{bg=l3} 52.75
& \SetCell{bg=l2} 52.2
& \SetCell{bg=lD4} 49.95
& \SetCell{bg=l4} 50.05
& \SetCell{bg=lD4} 51.55 \\
\end{talltblr}
\end{table}
\end{document}
摘自上一篇文章如何用两条线填充表格单元格的颜色
我想使列(例如,d=2.5m)稍微宽一些,并用垂直线将理想、简单和复杂的部分分开。
我在其他表中使用的定义\newcolumntype{?}{!{\vrule width 1pt}}
不适用于 tabulararray 环境。