Multiline text in S column in tblr environment

tabularray

The code below

\documentclass{article}

\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\UseTblrLibrary{siunitx}

\begin{document}
\begin{table}[htbp]
\centering
\begin{tblr}{
    colspec={X Q[si={table-format=2.2},c] Q[si={table-format=2.2},c]},
    row{1} = {c}
}
\toprule
Text & {{{LongText\\Text}}} & {{{Another\\Text}}}\\
\midrule
Some very long text & 11.11 & 22.22\\
\end{tblr}
\end{table}
\end{document}

produces the following error:

Something's wrong–perhaps a missing \item.

What may be the solution to this problem? If I remove the multiline texts in the 1st row the error vanishes. As within a tblr environment, one can insert multiline text by enclosing in a curly brace, I tried using four braces in the 1st row. But that also produced the same error.

Best Answer

It is a known bug (see https://github.com/lvjr/tabularray/issues/90) and has been fixed. You may wait for next version or try the latest code https://github.com/lvjr/tabularray/raw/main/tabularray.sty

As a workaround for current version, you can use cmd= to disable siunitx in the first row. In fact, it is even better since you only need one pair of braces.

\documentclass{article}

\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\UseTblrLibrary{siunitx}

\begin{document}
\begin{table}[htbp]
\centering
\begin{tblr}{
    colspec={X Q[si={table-format=2.2},c] Q[si={table-format=2.2},c]},
    row{1} = {c,cmd=}
}
\toprule
Text & {LongText\\Text} & {Another\\Text} \\
\midrule
Some very long text & 11.11 & 22.22\\
\end{tblr}
\end{table}

\end{document}

enter image description here