Closed andrewheiss closed 7 months ago
Interesting. I'm not sure what tabularray
does for the end lines. I can just add 1 to the last j
index, but that appears to make underlines stretch to far when the end position is not the last column. It's as if tabularray
had a "hidden" last column.
For reference, here's the LaTeX code:
\begin{table}
\centering
\begin{tblr}[ %% tabularray outer open
] %% tabularray outer close
{ %% tabularray inner open
colspec={Q[]Q[]Q[]Q[]Q[]},
cell{1}{2}={c=2,}{halign=c,},
cell{1}{4}={c=2,}{halign=c,},
cell{5}{1}={c=5}{},cell{11}{1}={c=5}{},
cell{3}{1}={preto={\hspace{1em}}},
cell{4}{1}={preto={\hspace{1em}}},
cell{6}{1}={preto={\hspace{1em}}},
cell{7}{1}={preto={\hspace{1em}}},
cell{8}{1}={preto={\hspace{1em}}},
cell{9}{1}={preto={\hspace{1em}}},
cell{10}{1}={preto={\hspace{1em}}},
cell{12}{1}={preto={\hspace{1em}}},
cell{13}{1}={preto={\hspace{1em}}},
cell{14}{1}={preto={\hspace{1em}}},
cell{15}{1}={preto={\hspace{1em}}},
row{5}={,bg=ce6e6e6,},
row{11}={,bg=ce6e6e6,},
hline{5,11,6,12}={1,2,3,4,5,6}{solid, 0.05em, black},
hline{8,9}={1,2,3,4,5}{solid, 0.05em, black},
} %% tabularray inner close
\tinytableDefineColor{ce6e6e6}{HTML}{e6e6e6}
\toprule
& Foo & & Bar & \\ \cmidrule[lr]{2-3}\cmidrule[lr]{4-5}
mpg & cyl & disp & hp & drat \\ \midrule %% TinyTableHeader
21.0 & 6 & 160.0 & 110 & 3.90 \\
21.0 & 6 & 160.0 & 110 & 3.90 \\
Hello &&&&& \\
22.8 & 4 & 108.0 & 93 & 3.85 \\
21.4 & 6 & 258.0 & 110 & 3.08 \\
18.7 & 8 & 360.0 & 175 & 3.15 \\
18.1 & 6 & 225.0 & 105 & 2.76 \\
14.3 & 8 & 360.0 & 245 & 3.21 \\
World &&&&& \\
24.4 & 4 & 146.7 & 62 & 3.69 \\
22.8 & 4 & 140.8 & 95 & 3.92 \\
19.2 & 6 & 167.6 & 123 & 3.92 \\
\bottomrule
\end{tblr}
\end{table}
The source of the problem was that group_tt()
inserted an extraneous column in LaTeX.
Should be fixed on Github main
.
Thanks for the report.
When adding a top or bottom border with
style_tt()
on a group label row, the border doesn't take up 100% of the row in LaTeX: