tblr_expand

 avatar
Eureka
latex
18 days ago
591 B
3
Indexable
Never
\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}
Leave a Comment