#### 33.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:

    [TableStartMacros]
    *=<tr><td colspan="<$$_tblcols>"><hr></td></tr>

    [TableEndMacros]
    *=<tr><td colspan="<$$_tblcols>"><hr></td></tr>

See also:

§33.6.1 Invoking macros around tables

§37.3.4 Using predefined macro variables

Previous Topic: 33.6.5 Specifying row-group, row, and cell attributes with macros

Next Topic: 33.6.7 Selectively modifying table text with macros: an example

Parent Topic: 33.6 Using macros to control table properties

Sibling Topics:

33.6.1 Invoking macros around tables

33.6.2 Adding space before tables

33.6.3 Adjusting space after tables

33.6.4 Turning processing on and off around selected tables

33.6.5 Specifying row-group, row, and cell attributes with macros

33.6.7 Selectively modifying table text with macros: an example

Table of Contents • Index