Forgot password
 Register account
View 2633|Reply 0

表格自动编号

[Copy link]

677

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2015-2-2 22:15 |Read mode
转自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.

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-12 12:55 GMT+8

Powered by Discuz!

Processed in 0.045813 seconds, 22 queries