@@ -3,6 +3,23 @@ Table Properties
3
3
================
4
4
5
5
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
+
6
23
Autofit
7
24
-------
8
25
@@ -28,12 +45,13 @@ Specimen XML
28
45
29
46
.. highlight :: xml
30
47
31
- The following XML is generated by Word when inserting a 2x2 table::
48
+ The following XML represents a 2x2 table::
32
49
33
50
<w:tbl>
34
51
<w:tblPr>
35
52
<w:tblStyle w:val="TableGrid"/>
36
53
<w:tblW w:type="auto" w:w="0"/>
54
+ <w:jc w:val="right"/>
37
55
<w:tblLook w:firstColumn="1" w:firstRow="1" w:lastColumn="0"
38
56
w:lastRow="0" w:noHBand="0" w:noVBand="1" w:val="04A0"/>
39
57
</w:tblPr>
@@ -151,6 +169,22 @@ Schema Definitions
151
169
<xsd:element name="tblPrChange" type="CT_TblPrChange" minOccurs="0"/>
152
170
</xsd:sequence>
153
171
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
+
154
188
<!-- table width ------------------------------------- -->
155
189
156
190
<xsd:complexType name="CT_TblWidth">
0 commit comments