Forgot password?
 Register account
View 2633|Reply 0

表格自动编号

[Copy link]

682

Threads

110K

Posts

206

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 | 快速注册

$\LaTeX$ formula tutorial

Mobile version

2025-6-8 04:59 GMT+8

Powered by Discuz! star

Processed in 0.016954 second(s), 21 queries

× Quick Reply To Top Edit