[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

tblW (Preferred Table Width Exception)

This element specifies the preferred width for the parent table row via a set of table-level property exceptions. This preferred width is used as part of the table layout algorithm specified by the tblLayout element (§2.4.49n; §2.4.50) - full description of the algorithm in the ST_TblLayout simple type2.18.94).

All widths in a table are considered preferred because:

The table must satisfy the shared columns as specified by the tblGrid element (§2.4.44)

Two or more widths may have conflicting values for the width of the same grid column

The table layout algorithm (§2.18.94) may require a preference to be overridden

This value is specified in the units applied via its type attribute. Any width value of type pct for this element shall be calculated relative to the text extents of the page (page width excluding margins).

If this element is omitted, then the cell width shall be of type auto.

[Example: Consider a row in a WordprocessingML table defined as follows:

<w:tr>
<w:trPr>
<w:tblPrEx>
<w:tblW w:type="fixed" w:w="1440"/>
</w:tblPrEx>
</w:trPr>

</w:tr>

This table-level property exception specifies that it has a preferred table width of 1440 twentieths of a point (one inch). The resulting table row would therefore be sized such that the table maintains that preferred width, as follows:

 

Hello world

 

 

The text Hello world makes the middle cell larger, and the other two cells are size to maintain the preferred widths of one inch for the overall table width:

 

Hello world this is a longer string.

 

 

However, when the middle table cell requires a larger width to accommodate non-breaking text, that preference may be overridden as needed:

 

Hello worldddddddddddddddddddddddddddddd

 

 

In this case, the middle cell's long non breaking string caused the table to be expanded to prevent breaking the string, and therefore to override the preferred width on the table row. end example]

Parent Elements

tblPrEx2.4.57); tblPrEx2.4.58)

 

Attributes

Description

type (Table Width Type)

Specifies the units of the width property being defined by the parent element’s w attribute. This property is used to define various properties of a table, including: cell spacing, preferred width, and table margins.

 

If this attribute is omitted, then its value shall be assumed to be dxa (twentieths of a point).

 

[Example: Consider a table with a table cell bottom cell spacing with a type of dxa, as follows:

 

<w:bottom ... w:type="dxa" />

 

This type shall therefore be used to interpret the width specified in the w attribute as a value in twentieths of a point. end example]

 

The possible values for this attribute are defined by the ST_TblWidth simple type2.18.97).

w (Table Width Value)

Specifies the value of the width property being defined by the parent element. This property is used to define various properties of a table, including: cell spacing, preferred widths, and table margins.

 

If this attribute is omitted, then its value shall be assumed to be 0.

 

[Example: Consider a table with a bottom margin with a width of 302, as follows:

 

<w:bottom w:w="302" w:type="dxa" />

 

The value in the w attribute shall therefore be used to determine the width being specified in the context of the units specified in the type attribute. In this case, the type is twentieths of a point (dxa), so the width is 302 twentieths of a point (.2097 inches). end example]

 

The possible values for this attribute are defined by the ST_DecimalNumber simple type2.18.16).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_TblWidth">

   <attribute name="w" type="ST_DecimalNumber"/>

   <attribute name="type" type="ST_TblWidth"/>

</complexType>