How to fix the following error, so that the table saved in \MyTable can be read by tabularray?
./tabularrayfilecatch.tex:29: Misplaced alignment tab character &. \MyTable ->1 & 2 \ 3 & 4 \ 5 & 6 \ 7 & 8 \ 9 & 10 \ 11 & 12 \ 13 & 14 ... l.29 \end {tblr}
\begin{filecontents*}{mytable.tex}
1 & 2 \\
3 & 4 \\
5 & 6 \\
7 & 8 \\
9 & 10 \\
11 & 12 \\
13 & 14 \\
15 & 16 \\
17 & 18 \\
19 & 20 \\
\end{filecontents*}
\documentclass{article}
\usepackage[paperheight=75mm]{geometry}
\usepackage{xcolor, catchfile}
\usepackage{tabularray}
\UseTblrLibrary{booktabs,siunitx}
\begin{document}
\CatchFileDef{\MyTable}{mytable.tex}{}
\begin{tblr}[ long ]{ colspec = {X S} }
\toprule[1.5pt]
One & {{{Two}}} \\
\midrule
\MyTable
\bottomrule[1.5pt]
\end{tblr}
\end{document}

catchfilehas no role here. Also\newcommand{\MyTable}{1\\2}would result in an error. The documentation says to use\NewTableCommand{\MyTable}{...}, but it fails as well. – egreg Jul 09 '21 at 09:55\NewTableCommandis for defining commands which only change the styles of the table. – L.J.R. Jul 15 '21 at 03:42