7

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}
1
  • 2
    Yes, it is possible. On the very same way as at other tables packages.
    – Zarko
    Feb 23, 2022 at 17:43

1 Answer 1

9

I managed to answer my own question by just trying a bit more. Basically, I forgot that because of the optional argument [c,m], an extra set of curly braces is 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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .