Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding an auto-generated number in table row in asciidoc file

Tags:

asciidoc

Hi so I want to add "auto-generated" row number into a table in asciidoc file. I have something like this.

.Sample Table
[cols=2, options="header"]
|===
|ID | Description

|1
|This is row #1

|2
|This is row #2

|===

Where 1 and 2 are hardcoded. Is there a way to make them auto-generated? Like how we can have "." in list view to become numbers.

Thanks, KT.

like image 252
Kyle Avatar asked Oct 31 '25 05:10

Kyle


1 Answers

Try using the {counter} attribute. Here's a tutorial.

like image 110
Brian D Avatar answered Nov 01 '25 17:11

Brian D



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!