24.6.6 Capturing table row and column counts with variables
Two predefined macro variables allow you to access the numbers of columns and rows in the current table:
<$$_tblcols> Count of columns in the current table
<$$_tblrows> Count of rows in the current table
You can use these variables in macro expressions that manipulate or make use of table properties. For example, to add a rule above and below each table by placing the rule in an extra row that spans all columns:
*=<tr><td colspan="<$$_tblcols>"><hr></td></tr>
*=<tr><td colspan="<$$_tblcols>"><hr></td></tr>
§24.6.1 Invoking macros around tables
§28.3.4 Using predefined macro variables
> 24 Converting tables to HTML > 24.6 Using macros to control table properties > 24.6.6 Capturing table row and column counts with variables