| DocBook: The Definitive Guide 2.0.14 (Alpha)

# colspec

$Revision: 1.3 $

$Date: 2002/06/12 11:18:06 $

colspec — Specifications for a column in a table

## Synopsis

### Content Model

    colspec ::=
    EMPTY

### Attributes

Name | Type | Default
rowsep | CDATA | None
align |
Enumeration:
center
char
justify
left
right
| None
colwidth | CDATA | None
colname | CDATA | None
colnum | CDATA | None
char | CDATA | None
colsep | CDATA | None
charoff | CDATA | None

## Description

The attributes of this empty element specify the presentation characteristics of entries in a column of a table.

Each `ColSpec` refers to a single column. Columns are numbered sequentially from left to right in the table. If the `ColNum` attribute is not specified, the `ColSpec` is for the next column after the preceeding `ColSpec` or column 1 if it is the first `ColSpec`.

### Processing expectations

Suppressed. This element is expected to obey the semantics of the CALS Table Model Document Type Definition, as specified by OASIS Technical Memorandum TM 9502:1995 .

### Parents

These elements contain colspec: `entrytbl`, `tfoot`, `tgroup`, `thead`.

## Attributes

align

  `Align` specifies the horizontal alignment of `Entry`s (or `EntryTbl`s) in the column. The default alignment is inherited from the enclosing `TGroup`. If `Char` is specified, see also `Char` and `CharOff`. Individual `Entry`s and `EntryTbl`s can specify an alternate alignment.

char

  `Char` specifies the alignment character when the `Align` attribute is set to `Char`.

charoff

  `CharOff` specifies the percentage of the column's total width that should appear to the left of the first occurance of the character identified in `Char` when the `Align` attribute is set to `Char`. This attribute is inherited from the enclosing `TGroup`.

colname

  `ColName` gives a symbolic name to a column. The symbolic name can then be used in subsequent `Entry`s and `SpanSpec`s to identify the column.

colnum

  `ColNum` gives the number of the column defined by this `ColSpec`. If not specified, this `ColSpec` describes the next column to the right of the column defined by the previous `ColSpec` or the first column (column 1) if this is the first `ColSpec`.

colsep

  If `ColSep` has the value 1 (true), then a rule will be drawn to the right of the column described by this `ColSpec`. A value of 0 (false) suppresses the rule. The rule to the right of the last column in the table is controlled by the `Frame` attribute of the enclosing `Table` or `InformalTable` and the `ColSep` of the last column in the table is ignored. If unspecified, this attribute is inherited from enclosing elements. Individual `Entry`s or `EntryTbl`s can override the `ColSpec` setting of this attribute.

colwidth

  `ColWidth` specifies the desired width of the relevant column. It can be either a fixed measure using one of the CALS units (36pt, 10pc, etc.) or a proportional measure. Proportional measures have the form “number`*`”, meaning this column should be number times wider than a column with the measure “`1*`” (or just “`*`”). These two forms can be mixed, as in “`3*+1pc`”.

rowsep

  If `RowSep` has the value 1 (true), then a rule will be drawn below the cells in the specified column. A value of 0 (false) suppresses the rule. The rule below the last row in the table is controlled by the `Frame` attribute of the enclosing `Table` or `InformalTable` and the `RowSep` of the last row is ignored. If unspecified, this attribute is inherited from enclosing elements. Individual `Entry`s or `EntryTbl`s can override the `ColSpec` setting of this attribute.

## See Also

`entry`, `entrytbl`, `informaltable`, `row`, `spanspec`, `table`, `tbody`, `tfoot`, `tgroup`, `thead`.

## Examples

For examples, see `informaltable`, `table`.

colophon |  | command

Copyright © 1999, 2000, 2001, 2002, 2003 O'Reilly & Associates, Inc. All rights reserved.