IDML Reference / Tables
Rows, columns, and cells
The Row, Column and Cell children of a table — track sizes, AutoGrow and KeepWithNextRow, the column:row address, merged cells, insets, fills and strokes.
Reviewed against engine v0.71.12
A table's <Row> and <Column> children size its tracks; its <Cell> children hold the content and most of the formatting.
In short A <Column> carries a width. A <Row> carries a height, a minimum and maximum,
and whether it grows with its content (AutoGrow) or must stay with the next row
(KeepWithNextRow). Both are named by their zero-based index. A <Cell> names its grid position
as Name="column:row", can span rows and columns to merge, holds ordinary paragraphs, and
carries its own insets, fill, edge strokes, vertical justification, rotation and diagonal lines.
A three-row, two-column table: <Row> and <Column> give the tracks, and each <Cell>
holds a one-word paragraph.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Story xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
<Story Self="ustory">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Table Self="utable" HeaderRowCount="1" FooterRowCount="0" BodyRowCount="2" ColumnCount="2"
AppliedTableStyle="TableStyle/$ID/[Basic Table]"
TopBorderStrokeColor="Color/Black" TopBorderStrokeWeight="1"
BottomBorderStrokeColor="Color/Black" BottomBorderStrokeWeight="1"
LeftBorderStrokeColor="Color/Black" LeftBorderStrokeWeight="1"
RightBorderStrokeColor="Color/Black" RightBorderStrokeWeight="1">
<Row Self="urow0" Name="0" SingleRowHeight="24"/>
<Row Self="urow1" Name="1" SingleRowHeight="24"/>
<Row Self="urow2" Name="2" SingleRowHeight="24"/>
<Column Self="ucol0" Name="0" SingleColumnWidth="120"/>
<Column Self="ucol1" Name="1" SingleColumnWidth="120"/>
<Cell Self="ucell00" Name="0:0" RowSpan="1" ColumnSpan="1"
TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
AppliedCellStyle="CellStyle/$ID/[None]" FillColor="Color/Black"
BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1"
RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="1">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>Item</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell10" Name="1:0" RowSpan="1" ColumnSpan="1"
TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
AppliedCellStyle="CellStyle/$ID/[None]" FillColor="Color/Black"
BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>Qty</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell01" Name="0:1" RowSpan="1" ColumnSpan="1"
TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
AppliedCellStyle="CellStyle/$ID/[None]"
BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1"
RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="1">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>Paper</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell11" Name="1:1" RowSpan="1" ColumnSpan="1"
TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
AppliedCellStyle="CellStyle/$ID/[None]"
BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>12</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell02" Name="0:2" RowSpan="1" ColumnSpan="1"
TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
AppliedCellStyle="CellStyle/$ID/[None]"
RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="1">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>Toner</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell12" Name="1:2" RowSpan="1" ColumnSpan="1"
TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
AppliedCellStyle="CellStyle/$ID/[None]">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>4</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
</Table>
</CharacterStyleRange>
</ParagraphStyleRange>
</Story>
</idPkg:Story>
Columns
| Attribute · Column | Values | Seen in |
|---|---|---|
| Name | integer | 100% |
| SingleColumnWidth | length (pt) | 100% |
Columns are listed left to right. Name is the column's zero-based index, the first half of a
cell's address, and SingleColumnWidth its width in points.
Rows
| Attribute · Row | Values | Seen in |
|---|---|---|
| Name | integer | 100% |
| SingleRowHeight | length (pt) | 100% |
| MinimumHeight | integer / real | 86% |
| AutoGrow | false | 29% |
Rows are listed top to bottom across all regions: header rows first, then body, then footer.
Name is the row's zero-based index across the whole table. With AutoGrow on (the default), a
row is at least MinimumHeight tall and grows to fit its tallest cell, up to MaximumHeight.
With AutoGrow="false" the row stays at its set height whatever its cells hold, and text that
does not fit a cell is overset in that cell.
KeepWithNextRow="true" keeps a row in the same frame as the row after it, so a table never breaks
between them. StartRow forces a row to begin in the next column, frame or page.
In Paged: row heights,
AutoGrowandKeepWithNextRoware honoured, matched against InDesign: a fixed row keeps its height and oversets the lines that do not fit.StartRowis not read yet. Supported · verified
Cells
Address and span
| Attribute · Cell | Values | Seen in |
|---|---|---|
| Name | text | 100% |
| RowSpan | number (count) | 100% |
| ColumnSpan | number (count) | 100% |
| AppliedCellStyle | CellStyle reference | 90% |
Name is the cell's address: column index, a colon, row index, both zero-based, so the cell in
column 1 of row 0 is Name="1:0". InDesign lists cells column by column, but the address, not the
order, places a cell. A cell with ColumnSpan="2" covers its own column and the next; a cell with
RowSpan="3" covers its row and the two below. The positions it covers have no <Cell> of their
own.
In Paged: spans are honoured. A row-spanning cell that needs more height than its rows give adds the shortfall to the last row it spans. Supported · verified
Insets and text
A cell's content is ordinary text: one or more <ParagraphStyleRange> children, with their own
<Br/> marks, exactly as in a story. A cell can even hold a table.
| Attribute · Cell | Values | Seen in |
|---|---|---|
| TextTopInset | length (pt) | 90% |
| TextLeftInset | length (pt) | 90% |
| TextBottomInset | length (pt) | 90% |
| TextRightInset | length (pt) | 90% |
| VerticalJustification | TopAlign | CenterAlign | BottomAlign | JustifyAlign | 52% |
| RotationAngle | integer | 5% |
| MinimumFirstBaselineOffset | integer | 5% |
| ClipContentToCell | false | 19% |
The four insets pad the text from the cell's edges. VerticalJustification places the text
(TopAlign, CenterAlign, BottomAlign, JustifyAlign). RotationAngle turns the content by
90, 180 or 270 degrees; the borders and fill do not turn. FirstBaselineOffset and
MinimumFirstBaselineOffset place the first line, as in a text frame. ClipContentToCell clips
content that overflows the cell.
In Paged: a cell is composed like a small text frame. Insets come from the cell's own attributes, not from its cell style. Vertical justification and rotation are applied. The first line is placed by the cell's
Supported · verified Supported · verified Supported · verifiedFirstBaselineOffset(the ascent by default), its own or, when it states none, its cell style's throughBasedOn, withMinimumFirstBaselineOffsetas a floor for every value, as in a text frame; each later paragraph sits one leading below the one before.
Fill and edge strokes
| Attribute · Cell | Values | Seen in |
|---|---|---|
| FillColor | Color / Swatch reference | 57% |
| FillTint | number (percent) | 24% |
| TopEdgeStrokeColor | Color / Swatch reference | 81% |
| TopEdgeStrokeWeight | length (pt) | 76% |
| TopEdgeStrokeTint | number (percent) | 57% |
| TopEdgeStrokeType | StrokeStyle reference | 38% |
| TopEdgeStrokeGapColor | Color reference | 38% |
FillColor and FillTint paint the cell's background. Each edge (Top…, Bottom…, Left…,
Right…) has a colour, weight, tint, stroke type and gap colour. When a table style's dividers
apply, InDesign writes the resulting stroke on each cell's matching edge, so these edge attributes
are what most often draws a table's grid. A value on the cell wins over its cell style.
In Paged: the fill colour and the edge strokes are drawn, each edge in its stroke style (a double line as two rules, dotted styles as dots, other styles solid). A cell's
Supported · verifiedFillTint, else its cell style's throughBasedOn, tints its fill, and a style's edge tints apply the same way. Edge gap colours are not painted.
Diagonal lines
LeftLineDrawn draws the diagonal from the top-left to the bottom-right corner and
RightLineDrawn the one from top-right to bottom-left, each with its own …StrokeColor,
…StrokeWeight and …StrokeTint. DiagonalLineInFront puts the lines over the content instead
of behind it.
In Paged: diagonal lines are drawn with their tints and front or back order.
Supported · verified
Frequently asked questions
How does a <Cell> know its grid position?
From Name="column:row", both zero-based. The order in which cells are listed does not matter.
How are merged cells written?
As one <Cell> with RowSpan or ColumnSpan above 1. The grid positions it covers have no cell
element of their own.
What does AutoGrow="false" do?
It fixes the row at its set height. Text that does not fit a cell in that row is overset in the
cell instead of making the row taller.
Where does a cell's padding come from?
From its TextTopInset, TextLeftInset, TextBottomInset and TextRightInset attributes, or
from its cell style's insets when the cell sets none.
The table model
The Table element — the row and column counts that define the grid, the table style, header and footer rows, the outer border and the dividers.
Tables in the text flow
How a table sits in a story as its own paragraph's content, ends with that paragraph's Br, breaks across threaded frames, repeats headers and oversets.