Hello everybody,
How can I generate an automatic numbering of the first column cells in a table?
Writing them 'by hand' is a non sense. I've done it but I swear not to do it ever again!
Thanks.
General ⇒ Automatic numbering of cells in a table
NEW: TikZ book now 40% off at Amazon.com for a short time.

Automatic numbering of cells in a table
Hello,
here is one possibility, using a custom counter:The "n" column then gets a automatic numbering.
here is one possibility, using a custom counter:
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{array}\newcounter{TableRow}\newcolumntype{n}{>{\stepcounter{TableRow}\arabic{TableRow}}c}\begin{document}\setcounter{TableRow}{0}\begin{tabular}{nl}& Text \\& Text \\& Text\end{tabular}\end{document}