Template:Row numbers/doc

This is a stop-gap template that serves as an interface to Module:Row numbers.

This template makes it possible, in many cases, to have an incrementing row indexer/counter in a table so that adding or removing rows automatically adjusts the numbering of subsequent rows. This template will become obsolete if and when MediaWiki supports automatically adding row numbers via WikiTable syntax. See Phab: - "jquery.tablesorter: Add support for a 'fixed' column of row numbers." And see Help:Sortable tables, and the sections on row numbering and auto-ranking. Using Template:Row numbers is one of the methods described on that page.

Usage
This template takes an arbitrary number of parameters: the table and the starting index. There is a caveat: the table is wrapped in the template without escaping the  characters. The module is capable of dealing with this, but it is not capable of dealing with bare equals signs in the table syntax at the same time. As such, bare equals signs must be escaped with =: Internally, the Module maintains a monotonically increasing counter. The Module looks for the keywords  and   in the table. Keyword  is replaced with the next counter value; keyword   is replaced with the value from the last   replacement.