@@ -3,6 +3,23 @@ Table Properties
33================
44
55
6+ Alignment
7+ ---------
8+
9+ Word allows a table to be aligned between the page margins either left,
10+ right, or center.
11+
12+ The read/write :attr: `Table.alignment ` property specifies the alignment for
13+ a table::
14+
15+ >>> table = document.add_table(rows=2, cols=2)
16+ >>> table.alignment
17+ None
18+ >>> table.alignment = WD_TABLE_ALIGNMENT.RIGHT
19+ >>> table.alignment
20+ RIGHT (2)
21+
22+
623Autofit
724-------
825
@@ -28,12 +45,13 @@ Specimen XML
2845
2946.. highlight :: xml
3047
31- The following XML is generated by Word when inserting a 2x2 table::
48+ The following XML represents a 2x2 table::
3249
3350 <w:tbl>
3451 <w:tblPr>
3552 <w:tblStyle w:val="TableGrid"/>
3653 <w:tblW w:type="auto" w:w="0"/>
54+ <w:jc w:val="right"/>
3755 <w:tblLook w:firstColumn="1" w:firstRow="1" w:lastColumn="0"
3856 w:lastRow="0" w:noHBand="0" w:noVBand="1" w:val="04A0"/>
3957 </w:tblPr>
@@ -151,6 +169,22 @@ Schema Definitions
151169 <xsd:element name="tblPrChange" type="CT_TblPrChange" minOccurs="0"/>
152170 </xsd:sequence>
153171
172+ <!-- table alignment --------------------------------- -->
173+
174+ <xsd:complexType name="CT_JcTable">
175+ <xsd:attribute name="val" type="ST_JcTable" use="required"/>
176+ </xsd:complexType>
177+
178+ <xsd:simpleType name="ST_JcTable">
179+ <xsd:restriction base="xsd:string">
180+ <xsd:enumeration value="center"/>
181+ <xsd:enumeration value="end"/>
182+ <xsd:enumeration value="left"/>
183+ <xsd:enumeration value="right"/>
184+ <xsd:enumeration value="start"/>
185+ </xsd:restriction>
186+ </xsd:simpleType>
187+
154188 <!-- table width ------------------------------------- -->
155189
156190 <xsd:complexType name="CT_TblWidth">
0 commit comments