Compartir a través de


PositionalTab Class

Absolute Position Tab Character.When the object is serialized out as xml, its qualified name is w:ptab.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.PositionalTab

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

Syntax

'Declaration
Public Class PositionalTab _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As PositionalTab
public class PositionalTab : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

17.3.3.23 ptab (Absolute Position Tab Character)

This element specifies that an absolute position tab character shall be placed at the current location in the run content. An absolute position tab is a character which is used to advance the position on the current line of text when displaying this WordprocessingML content, using the following logic:

Regardless of any number of custom tab stops defined using the tabs element (§17.3.1.38) , the absolute position tab character shall advance to the position specified by its alignment and relativeTo attributes. The resulting end position of the tab character shall not be affected by the addition of any custom tab stops or changes to the value of the defaultTabStop element (§17.15.1.25).

If the alignment location specified by the positional tab cannot be found on the current line, because the starting location is past that point, then the tab character shall advance to that location on the next available line in the document.

[Example: Consider a paragraph which contains two custom tab stops at 1.5" and 3.5", respectively. These two tab stops would be contained within a tabs element defining the set of tab stops of the paragraph as follows:

<w:pPr>
  <w:tabs>
    <w:tab w:val="left" w:pos="2160" /> 
    <w:tab w:val="left" w:pos="5040" /> 
  </w:tabs>
</w:pPr>

If a positional tab character was added to a run in this paragraph starting at 1” inside the margin and was defined as follows:

<w:ptab … w:alignment="center" w:relativeTo="margin" /> 

This positional tab would then ignore the next custom tab stop and the indents on the current paragraph defined using the ind element (§17.3.1.12) and would advance to the center of the line with respect to the text margins, moving to a new line if needed. end example]

Parent Elements

r (§22.1.2.87); r (§17.3.2.25)

Attributes

Description

alignment (Positional Tab Stop Alignment)

Specifies the location of the positional tab stop on the line, as well as the alignment which shall be applied to text subsequent to the current positional tab stop.

[Example: Consider a positional tab stop in a WordprocessingML document who must move to the left edge of the text margins and whose subsequent text should be left aligned. This positional tab stop would be defined as follows:

<w:ptab w:alignment="left" w:relativeTo="margin" … /> 

The alignment attribute specifies that this absolute position tab stop must align on the left edge of the line relative to the margin. end example]

The possible values for this attribute are defined by the ST_PTabAlignment simple type (§17.18.71).

leader (Tab Leader Character)

Specifies the character which shall be used to fill in the space created by a positional tab. This character shall be repeated as required to completely fill the tab spacing generated by the positional tab character.

[Example: Consider a positional tab stop which should be preceded by a sequence of underscore characters, as follows:

______________Text at the positional tab stop

This tab stop would have a leader attribute value of underscore, indicating that the tab stop must be preceded by underscore characters as needed to fill the tab spacing. end example]

The possible values for this attribute are defined by the ST_PTabLeader simple type (§17.18.72).

relativeTo (Positional Tab Base)

Specifies the extents which shall be used to calculate the absolute positioning of this positional tab character.

[Example: Consider a positional tab stop in a WordprocessingML document that should have a resulting position that is centered on the text margins, ignoring both any custom tab stops and any text indents on the paragraph. This positional tab stop would be defined as follows:

<w:ptab w:relativeTo="margin" … /> 

The relativeTo attribute specifies that this absolute position tab stop must be relative to the margin. end example]

The possible values for this attribute are defined by the ST_PTabRelativeTo simple type (§17.18.73).

[Note: The W3C XML Schema definition of this element’s content model (CT_PTab) is located in §A.1. end note]

© 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

Reference

PositionalTab Members

DocumentFormat.OpenXml.Wordprocessing Namespace