IDML Reference / Tables
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.
Reviewed against engine v0.71.6
A table is part of the text flow: it is the content of a paragraph, draws where that paragraph lands, and breaks across frames between rows.
In short A <Table> sits inside a <CharacterStyleRange> of a paragraph, normally as that
paragraph's only content. The paragraph before it ends with its <Br/>, and when text follows
the table, a <Br/> right after </Table> ends the table's paragraph. The table draws where
its paragraph lands as the story flows through its frames. When it does not fit, it continues
in the next frame of the thread, breaking between rows, with its header and footer rows repeated.
Rows that no frame can hold are overset.
A table is a paragraph's content
Three paragraphs: a line of text, a table, and a line of text. The table's paragraph ends with
the <Br/> right after </Table>.
<?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]">
<Content>The table below rides on the second paragraph of this story.</Content>
<Br/>
</CharacterStyleRange>
</ParagraphStyleRange>
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Table Self="utable" HeaderRowCount="1" BodyRowCount="2" FooterRowCount="0" ColumnCount="2" AppliedTableStyle="TableStyle/$ID/[Basic Table]">
<Row Self="urow0" Name="0" SingleRowHeight="20"/>
<Row Self="urow1" Name="1" SingleRowHeight="20"/>
<Row Self="urow2" Name="2" SingleRowHeight="20"/>
<Column Self="ucol0" Name="0" SingleColumnWidth="120"/>
<Column Self="ucol1" Name="1" SingleColumnWidth="120"/>
<Cell Self="ucell00" Name="0:0" RowSpan="1" ColumnSpan="1" AppliedCellStyle="CellStyle/$ID/[None]"
TextTopInset="4" TextLeftInset="4" TextBottomInset="4" TextRightInset="4"
TopEdgeStrokeColor="Color/Black" TopEdgeStrokeWeight="0.5" BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="0.5"
LeftEdgeStrokeColor="Color/Black" LeftEdgeStrokeWeight="0.5" RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="0.5">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>Size</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell10" Name="1:0" RowSpan="1" ColumnSpan="1" AppliedCellStyle="CellStyle/$ID/[None]"
TextTopInset="4" TextLeftInset="4" TextBottomInset="4" TextRightInset="4"
TopEdgeStrokeColor="Color/Black" TopEdgeStrokeWeight="0.5" BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="0.5"
LeftEdgeStrokeColor="Color/Black" LeftEdgeStrokeWeight="0.5" RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="0.5">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>Price</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell01" Name="0:1" RowSpan="1" ColumnSpan="1" AppliedCellStyle="CellStyle/$ID/[None]"
TextTopInset="4" TextLeftInset="4" TextBottomInset="4" TextRightInset="4"
TopEdgeStrokeColor="Color/Black" TopEdgeStrokeWeight="0.5" BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="0.5"
LeftEdgeStrokeColor="Color/Black" LeftEdgeStrokeWeight="0.5" RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="0.5">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>A5</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell11" Name="1:1" RowSpan="1" ColumnSpan="1" AppliedCellStyle="CellStyle/$ID/[None]"
TextTopInset="4" TextLeftInset="4" TextBottomInset="4" TextRightInset="4"
TopEdgeStrokeColor="Color/Black" TopEdgeStrokeWeight="0.5" BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="0.5"
LeftEdgeStrokeColor="Color/Black" LeftEdgeStrokeWeight="0.5" RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="0.5">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>4.00</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell02" Name="0:2" RowSpan="1" ColumnSpan="1" AppliedCellStyle="CellStyle/$ID/[None]"
TextTopInset="4" TextLeftInset="4" TextBottomInset="4" TextRightInset="4"
TopEdgeStrokeColor="Color/Black" TopEdgeStrokeWeight="0.5" BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="0.5"
LeftEdgeStrokeColor="Color/Black" LeftEdgeStrokeWeight="0.5" RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="0.5">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>A4</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Self="ucell12" Name="1:2" RowSpan="1" ColumnSpan="1" AppliedCellStyle="CellStyle/$ID/[None]"
TextTopInset="4" TextLeftInset="4" TextBottomInset="4" TextRightInset="4"
TopEdgeStrokeColor="Color/Black" TopEdgeStrokeWeight="0.5" BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="0.5"
LeftEdgeStrokeColor="Color/Black" LeftEdgeStrokeWeight="0.5" RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="0.5">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>6.50</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
</Table>
<Br/>
</CharacterStyleRange>
</ParagraphStyleRange>
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
<Content>Text after the table continues in the next paragraph.</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Story>
</idPkg:Story>
Because a table rides on a paragraph, it has no position of its own. It starts where its paragraph starts: at the paragraph's place in the column, after the text above it. Whatever follows the table in the story continues below it. Moving the paragraph moves the table.
The table's paragraph follows the paragraph model
like any other: its mark is the last thing in it, after </Table>, inside the same
<CharacterStyleRange>. Without that <Br/>, the text after the table would be part of the
table's paragraph. A table at the very end of a story needs no mark, like any last paragraph.
The paragraph's attributes still apply to the table as a whole. Its alignment places a table that
is narrower than the column, and its space before and after separate the table from its
neighbours, together with the table's own SpaceBefore and SpaceAfter.
In Paged: a table stands at its own place in the paragraph's text, as InDesign sets it, whether or not it shares a
<CharacterStyleRange>with the text around it. Text before it in the same paragraph ends a line, the table takes a line of its own, and text after it starts the next line of the same paragraph, with no first-line indent, space before or list number of its own. Supported · verified
Breaking across frames
A story can be threaded through a chain of
frames. A table taller than the room left in its frame continues in the next frame of the chain:
the first frame holds as many rows as fit, and the rest follow at the top of the next. A table
breaks between rows. A row with KeepWithNextRow="true" moves to the next frame together with
the row after it, and a row with StartRow set starts in the next column, frame or page.
Header rows repeat at the top of each continuation and footer rows at the bottom of each part but
the last; see the table model for BreakHeaders,
BreakFooters, SkipFirstHeader and SkipLastFooter.
In Paged: a table breaks between rows across the frames of its thread, honouring
KeepWithNextRow, and repeats its header and footer rows once per frame. A row is never split across frames. Supported · verified
Overset rows
When the last frame of the thread cannot hold the remaining rows, they are overset: they stay in the story but are not drawn, exactly like overset text.
In Paged: rows the last frame cannot hold are overset and reported, following InDesign's own output for tables that do not fit. Supported · verified
Frequently asked questions
How is a table positioned on the page? It is not positioned directly. It is the content of a paragraph and draws where that paragraph lands in the story's frames.
Does the paragraph that holds a table need a <Br/>?
Yes, when more text follows. The <Br/> comes right after </Table>, in the same
<CharacterStyleRange>, and ends the table's paragraph. A table at the end of the story needs
none.
What happens when a table is taller than its frame? It continues in the next frame of the thread, breaking between rows. Header and footer rows repeat in each part. Rows that no frame can hold are overset.
Can I keep two rows together across a frame break?
Yes. Set KeepWithNextRow="true" on the first <Row>, and the two rows always share a frame.
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.
Color & swatches
How an IDML document keeps its colours in one palette in Graphic.xml, which elements the palette holds, and how a fill or stroke resolves to a colour.