Counters malfunctioning
If I create a new counter and use commands like \stepcounter or \addtocounter inside the tblr environment,then the value of the counter will change more than once as the program trying to put things in the right place once, twice, or more. If I set the widths of all the cells to a fixed length,then it will only try to order things for one time, then the counter commands works well. But if you leave --- even one of all --- the colomn widths for the program to figure out how much it needs, then while trying to place the table, the counter commands will be executed more than wanted.
So I wonder if you could add a step to calculate the values of the counters first before trying to create the tables?
You need to load counter library (see section 5.3 in the manual). And you need to provide a minimal example in reporting an issue.
Well, I'll check the manual and try it out. Thanks for your suggestion.
And a minimal example:
% required packages: xcolor,tabularray
% by the way, the line with "10)" cannot align well.
\begin{table*}[htbp]
\centering
\refstepcounter{table}
Table\thetable :This is a table
\label{table1}
\newcounter{myiitems}
\newcommand{\myiitem}{\themyiitems)\addtocounter{myiitems}{1}}
\setcounter{myiitems}{1}
% \newcommand{\myiitem}{\stepcounter{items}(\themyiitems)}
% \newcommand{\myiitem}{(\arabic{myiitems})\addtocounter{myiitems}{1}}
% here are some of my trials by modifying my commands before i worked out how many
\noindent\begin{tblr}{colspec={Q[r]X[l,1]},hline{1,2,26}={0.5pt,black}}
&\textbf{Questions}\setcounter{myiitems}{1}\\
% if there is no \setcounter command at this place,
% then I'll see the counter value beginning with 98, adding up with 2 each time
\myiitem & one \\
\myiitem & two \\
\myiitem & three \\
\myiitem & four \\
\myiitem & five \\
\myiitem & six\\
\myiitem & seven \\
\myiitem & eight \\
\myiitem & nine \\
\myiitem & ten \\
\myiitem & eleven\\
\myiitem & twelve \\
\myiitem & thirteen \\
\myiitem & fourteen\\
\myiitem & fifteen\\
\myiitem & sixteen \\
\myiitem & seventeen \\
\myiitem & eighteen\\
\myiitem & nineteen \\
\myiitem & twenty\\
\myiitem & twenty-one \\
\myiitem & twenty-two\\
\myiitem & twenty-three\\
\myiitem & twenty-four\\
\end{tblr}
\end{table*}
It has: