Macro Language Reference > PIs > Tables > <?tbcolspec>
  
<?tbcolspec>
Description
Prior to version 8 and the introduction of <?tbcolspec>, all column properties were set with <?tbcol*> commands. Each individual column property is propagated independently from the others, until every column has a value (see <?tbcolw> to see how the propagation works). Overriding a property within a single column, either needs the table to be prescanned and the property specified within the data for the column; or needs the property to be specified for all the intervening columns too.
All of this is still true if no <?tbcolspec> commands are encountered. The <?tbcolspec> command lets you specify that all column commands apply to a given column, until a new <?tbcolspec> command is encountered. In addition, any cell commands (<?tbc*>) will provide the default cell properties for the designated column.
When PTC ALD finds the first <?tbcolspec> command in a table, all the same propagation of column properties takes place as before, setting up the default column properties. In addition the default cell properties for the table are built from the current cell state. Whenever a new <?tbcolspec> command is encountered, these properties will be reinstated as the defaults to be overridden if desired.
If colnum is specified it designates which column is currently being defined, with 1 being the first column.
 
This means that you can specify a particular column more than once, but if you do so, beware of using repeat, because the cell properties will be set back to the existing column’s default cell each time.
If repeat is specified it defines the number of columns that will have the same default. Note this is identical to specifying <?tbcolrep=repeat> just after the <?tbcolspec> command.
Syntax
<?tbcolspec ( colnum:n? ( repeat:n? ) )>
colnum
Number of column being defined: defaults to the next column if a value isn’t given or is 0.
repeat
The number of columns to have the same default
Additional Information
 
<?tbcolspec> lets you specify any cell properties for a column; it does this by taking a snapshot of ALL the cell properties that it will subsequently use for each cell within the column. This includes default properties that you haven’t explicitly specified. This makes<?tbcolspec> incompatible with <?tbrdef> and <?tbrdefx> as every cell property is now also a column property. As a result, you can only use either <?tbrdef> or<?tbrdefx, OR <?tbcolspec>.