tblr_expand
Eureka
latex
a year ago
591 B
9
Indexable
\documentclass[zihao=-4,a4paper,punct=kaiming,oneside]{ctexart}
\usepackage{tabularray}
\UseTblrLibrary{counter}
% counter and cmd
\newcounter{spl}
\newcommand{\spl}{\stepcounter{spl}\arabic{spl}}
\newcommand*\lfrmh{empty & ok & \spl\\}
\newcommand*\lfrmhh{xx & yy & zz\\}
\newcommand*\lfrmhhh{xxx & yyy & www\\}
\begin{document}
\begin{longtblr}[expand=\lfrmh\lfrmhh\lfrmhhh]{colspec={|X|X|X|}}
\hline
\lfrmh
\lfrmh
\lfrmhh
\lfrmhhh
a & b & c\\
\hline
\end{longtblr}
\vspace*{5em}
最右边一列希望是:0、1、2 ……递增
\end{document}Editor is loading...
Leave a Comment