4

Is it possible to repeat the same column type for tabularray?

For a normal tabular one can use *{5}c, if one does not want to repeat {ccccc}. I have tried it with tabularray, but it does not seem to work.

I want to have

{colspec = {Q[c,m,0.25\textwidth]Q[c,m]Q[c,m]Q[c,m]Q[c,m]}}

But this can not be written as colspec = {Q[c,m,0.25\textwidth] *{4}Q[c,m]}

MWE:

\documentclass{scrartcl}
\usepackage{tabularray}
\begin{document}
    Test 
    \begin{tblr}{colspec = {Q[c,m,0.25\textwidth]Q[c,m]Q[c,m]Q[c,m]Q[c,m]}}
        a & a & a & a & a \\
    \end{tblr}
    % The one below does not work. The one above does. 
    \begin{tblr}{colspec = {Q[c,m,0.25\textwidth] *{4}Q[c,m]}}
        a & a & a & a & a \\
    \end{tblr}
\end{document}
5

Ok this was a stupid question. I forgot that because of the optional argument [c,m], braces are needed.

Thus it is possible by just:

\documentclass{scrartcl}
\usepackage{tabularray}
\begin{document}
    Test 
    \begin{tblr}{colspec = {Q[c,m,0.25\textwidth]Q[c,m]Q[c,m]Q[c,m]Q[c,m]}}
        a & a & a & a & a \\
    \end{tblr}
    % Both work.
    \begin{tblr}{colspec = {Q[c,m,0.25\textwidth] *{4}{Q[c,m]}}}
        a & a & a & a & a \\
    \end{tblr}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.