<forgetLastTabAlignment>
(Ignore Width of Last Tab Stop When Aligning Paragraph If It Is Not Left Aligned)
This element specifies how applications should handle the final tab stop on a line when aligning the contents of a paragraph as specified by the <jc>
element (§2.3.1.13) in the paragraph's properties.
Typically, aligning the contents of a paragraph involves the following:
Determining the layout of that line before the alignment (including all tab stops)
Aligning the resulting contents of the line
This is done to ensure that tab stops on a line do not change when the contents of the paragraph are aligned (i.e. the tab stops should not have to take into account the paragraph alignment).
This element, when present with a @val
attribute value of true
(or equivalent), specifies that applications shall ignore the additional line width generated by the last tab stop (and only the last tab stop) when the alignment of the tab stop as defined by the @val
attribute on the <tab>
element (§2.3.1.37) is not left
(or bar
, which as defined by this Office Open XML Standard, is not a tab stop per se) when determining the width of the line. The resulting full line shall then be aligned at the position where the line would have been aligned without that tab stop.
<w:p> <w:pPr> <w:tabs> <w:tab w:val="center" w:pos="2880" /> </w:tabs> <w:jc w:val="center" /> </w:pPr> <w:r> <w:t>Text Before</w:t> <w:tab/> <w:t>Text After</w:t> </w:r> </w:p> <w:p> <w:pPr> <w:jc w:val="center" /> </w:pPr> <w:r> <w:t>Text BeforeText After</w:t> </w:r> </w:p>
The default presentation would determine the full width of each line including the tab stops, finally aligning the resulting text to the center
position as requested by the <jc>
element:
However, if this compatibility setting is turned on:
<w:compat> <w:forgetLastTabAlignment /> </w:compat>
Then the width added to the line by the last tab is ignored when centering the paragraph because that tab is a center
aligned tab stop, resulting in the following output:
In the resulting output, the starting location of both lines is at the same place on the page, as the resulting width of both lines is identical when the tab stop is removed from the line width calculation. ]
Parent Elements |
---|
|
Attributes |
Description |
---|---|
|
Specifies a binary value for the property defined by the parent XML element. A value of A value of <w:… w:val="off"/> The 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>