[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

snapToGrid (Use Document Grid Settings for Inter-Line Paragraph Spacing)

This element specifies whether the current paragraph should use the document grid lines per page settings defined in the docGrid element (§2.6.5) when laying out the contents in the paragraph. This setting determines whether the additional line pitch specified in the document grid shall be added to each line in this paragraph as specified by the document grid.

If this element is omitted on a given paragraph, its value is determined by the setting previously set at any level of the style hierarchy (i.e. that previous setting remains unchanged). If this setting is never specified in the style hierarchy, then the paragraph shall use the document grid to lay out text when a document grid is defined for this document.

[Example: Consider two single-spaced paragraphs in a section with a document grid set to allow 15 lines per page. This document grid would effectively specifies that an additional line pitch of 45.6 points shall be added to each line in order to ensure that the resulting page contains only 15 lines of text.

If this property is set on the first paragraph, but turned off on the second paragraph, as follows:

<w:p>

<w:pPr>

<w:snapToGrid w:val="off" />

</w:pPr>

...

</w:p>

<w:p>

...

</w:p>

The resulting document shall have 45.6 points of additional line pitch added to each line in paragraph two, but zero lines of additional line pitch added to each line in paragraph one, since the snapToGrid property is turned off. end example]

Parent Elements

pPr2.7.4.2); pPr2.9.24); pPr2.3.1.25); pPr2.7.5.1); pPr2.3.1.26); pPr2.7.7.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 type2.18.67).

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

<complexType name="CT_OnOff">

   <attribute name="val" type="ST_OnOff"/>

</complexType>