ForgetLastTabAlignment Class

Ignore Width of Last Tab Stop When Aligning Paragraph If It Is Not Left Aligned.When the object is serialized out as xml, its qualified name is w:forgetLastTabAlignment.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


Public Class ForgetLastTabAlignment _
    Inherits OnOffType
Dim instance As ForgetLastTabAlignment
public class ForgetLastTabAlignment : OnOffType


[ISO/IEC 29500-1 1st Edition] 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 (Part 1, § 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 (Part 1, § is not left (or bar, which as defined by ISO/IEC 29500, 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.

[Example: Consider a WordprocessingML document with two center aligned paragraphs of text - the first also containing a centered tab stop positioned at 2":

<w:tab w:val="center" w:pos="2880" />
<w:jc w:val="center" />
<w:t>Text Before</w:t>
<w:t>Text After</w:t>
<w:jc w:val="center" />
<w:t>Text BeforeText After</w:t>

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:forgetLastTabAlignment />

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. end example]

Parent Elements

compat (Part 1, §

This element’s content model is defined by the common boolean property definition in Part 1, §17.17.4.

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


ForgetLastTabAlignment Members

DocumentFormat.OpenXml.Wordprocessing Namespace