假设你想要一个 IDML 文件中的 2x2 表,层次结构看起来像 = Story -> ParagraphStyleRange -> Table
一个最小的 Table 元素看起来像这样 -
<Table Self="u126i190" ColumnCount="2" BodyRowCount="2" FooterRowCount="0" HeaderRowCount="0">
<Row Self="u126i190Row0" Name="0"/>
<Row Self="u126i190Row1" Name="1"/>
<Column Self="u126i190Column0" Name="0" SingleColumnWidth="47.760000000000005"/>
<Column Self="u126i190Column1" Name="1" SingleColumnWidth="47.760000000000005"/>
<Cell Self="u126i190i5" Name="0:0" ColumnSpan="1" RowSpan="1">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/NormalParagraphStyle">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]"/>
<Content>Row 1 Column 1</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Cell>
<Cell Name="1:0"> .... </Cell>
<Cell Name="0:1"> .... </Cell>
<Cell Name="1:1"> .... </Cell>
</Table>
单元格的 Name 属性值为 = ColumnName:RowName。