[Table of Contents] [docx version]
WordprocessingML Reference Material - Table of Contents
snapToGrid (Use Document Grid Settings For Inter-Character Spacing)
This element specifies whether the current run should use the document grid characters per line settings defined in the docGrid element (§2.6.5) when laying out the contents in this run. This setting determines whether the additional character pitch specified in the document grid shall be added to each character in this run as specified by the document grid.
If this element is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this element is never applied in the style hierarchy, then the run shall use the document grid setting to lay out text when a document grid is defined for the parent section.
[Example: Consider two runs in a section with a document grid set to allow 20 characters per line. This document grid would effectively specifies that an additional character pitch shall be added to each line in order to ensure that the resulting line contains only 20 East Asian characters.
If this property is set on the first run, but turned off on the second run, as follows:
<w:r>
<w:t>Run One</w:t>
</w:r>
<w:r>
<w:rPr>
<w:snapToGrid w:val="off" />
</w:rPr>
<w:t>Run Two</w:t>
</w:r>
The resulting document shall have the required additional character pitch added to each character in run one, but zero additional character pitch added to each character in run two, since the snapToGrid property is turned off. end example]
Parent Elements |
rPr (§2.7.8.1); rPr (§2.3.1.29); rPr (§2.5.2.26); rPr (§2.3.2.25); rPr (§2.3.2.26); rPr (§2.7.4.4); rPr (§2.3.1.30); rPr (§2.9.26); rPr (§2.5.2.27); rPr (§2.7.5.2) |
Attributes |
Description |
val (On/Off Value) |
Specifies a binary value for the property defined by the parent XML element.
A value of on, 1, or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted.
A value of off, 0, or false specifies that the property shall be explicitly turned off.
[Example: For example, consider the following on/off property:
<w:… w:val="off"/>
The val attribute explicitly declares that the property is turned off. end example]
The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_OnOff">
<attribute name="val" type="ST_OnOff"/>
</complexType>