我怎样才能将这段代码放入命令中,使其更有条理和更精确?
答案1
您可以为此使用一个列类型:
\documentclass{article}
\usepackage{tabu,longtable}
\newcounter{myrow}
\newcommand\mybox{\fbox{X}}
\newcolumntype{Y}{>{\stepcounter{myrow}\themyrow.}l
X[3]
@{\hspace{2em}}
>{\mybox}l
@{\hspace{4pt}}
X}
\begin{document}
\begin{longtabu} to \textwidth{Y}
&
sometext
&&
some long text some long text some long text some long text
\end{longtabu}
\end{document}