1

I am trying to create a table with lots of content inside. I don't want to see many & characters so I declare the function with many arguments, but compile error. Please help me point out where the error is. Thank you.

\documentclass[12pt,a4paper]{article}
\usepackage{tabularray-2021}
\newcommand{\group}[3]{
    \SetCell[r=4]{m}{{#1 \\ #2}} #3
}
\newcommand{\myrow}[4]{& #1 & #2 & #3 & #4  \\}
\begin{document}
    \begin{tblr}{colspec=XXXXX}
        \group{1}{2}{
        \myrow{a}{b}{c}{d} 
        \myrow{a}{b}{c}{d}
        \myrow{a}{b}{c}{d}
        \myrow{a}{b}{c}{d}
    }
    \end{tblr}
\end{document}

0 Answers0