\documentclass[utf8]{ctexart}
\usepackage{xeCJK}
\usepackage{enumerate}
\usepackage{graphicx}
\graphicspath{{img/}} %% 图片路径,图片都放在这个文件夹里了.
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bbding}
\usepackage{pifont}
\usepackage{ulem}
\usepackage{float}
\usepackage{array}
\usepackage{tabularray}
\usepackage{multirow}
\usepackage{xeCJKfntef}
\newcounter{asdfg}
\newcommand{\Rown}{\stepcounter{asdfg}\theasdfg}
\begin{document}
\begin{tabular}{ccc}
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\end{tabular}
\begin{tabular}{ccc}
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\end{tabular}
\newpage
\begin{tabular}{ccc}
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\end{tabular}
\newpage
\begin{table}[H]
\begin{center}
%\newcounter{Rownumber}
%\newcommand{\Rown}{\stepcounter{Rownumber}\theRownumber}
\SetTblrInner{rowsep=1pt}
\zihao{4}
\begin{tblr}{
colspec={|m{16mm}|m{28mm}|m{90mm}|m{16mm}|},
rowspec={*{24}{|m{10mm}}|},
cell{1}{1}={c=4}{c},
cells={c}
}
政府正常桌子直接大规模桌面&&&\\
政府&直接正常&直接桌子&直接\\
\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\
\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\
\Rown\\\Rown\\\Rown\\\Rown
\end{tblr}
\end{center}
\end{table}
\end{document}
为什么第三页的序号不能从1开始?怎么才能让每页的序号从1开始?
tabularray 的计数器方面需要加 \UseTblrLibrary{counter}
,就正常了。至于重置实际可以让计数器和页码的变化关联来重置就好了。
\documentclass[utf8]{ctexart}
\usepackage{xeCJK}
\usepackage{enumerate}
\usepackage{graphicx}
\graphicspath{{img/}} %% 图片路径,图片都放在这个文件夹里了.
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bbding}
\usepackage{pifont}
\usepackage{ulem}
\usepackage{float}
\usepackage{array}
\usepackage{tabularray}
\UseTblrLibrary{counter}
\usepackage{multirow}
\usepackage{xeCJKfntef}
\newcounter{asdfg}
\newcommand{\Rown}{\stepcounter{asdfg}\theasdfg}
\usepackage{chngcntr}
\counterwithin{asdfg}{page} % 重新关联
\renewcommand\theasdfg{\arabic{asdfg}}
\begin{document}
\begin{tabular}{ccc}
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\end{tabular}
\begin{tabular}{ccc}
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\end{tabular}
\newpage
\begin{tabular}{ccc}
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\Rown &给 &给\\
\end{tabular}
\newpage
\begin{table}[H]
\begin{center}
%\newcounter{Rownumber}
%\newcommand{\Rown}{\stepcounter{Rownumber}\theRownumber}
\SetTblrInner{rowsep=1pt}
\zihao{4}
\begin{tblr}{
colspec={|m{16mm}|m{28mm}|m{90mm}|m{16mm}|},
rowspec={*{24}{|m{10mm}}|},
cell{1}{1}={c=4}{c},
cells={c}
}
政府正常桌子直接大规模桌面&&&\\
政府&直接正常&直接桌子&直接\\
\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\
\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\\Rown\\
\Rown\\\Rown\\\Rown\\\Rown
\end{tblr}
\end{center}
\end{table}
看看这个 https://www.zhihu.com/question/501741864/answer/2244093701
原理是相同的,只要把它的 sidenote 计数器改为你的计数器即可。