|
转自latex-community.org/component/content/article … /500-latex-tricks-ix
Rows in tables
A traditional application of tables is to number every row in it. If you put
\usepackage{array}
in the preamble, and
\newcounter{rowno}
\setcounter{rowno}{0}
\begin{document}
\begin{tabular}{>{\stepcounter{rowno}\therowno.}cl}
\multicolumn{1}{r}{No.} & text \\
\hline
& first \\
& second \\
& third \\
& fourth
\end{tabular}
in the body, the result is the following:
Numbered rows in a table
This might be useful in many situations. |
|