Indentation Class
Defines the Indentation Class.When the object is serialized out as xml, its qualified name is w:ind.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.Indentation
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class Indentation _
Inherits OpenXmlLeafElement
'Usage
Dim instance As Indentation
public class Indentation : OpenXmlLeafElement
Remarks
[ISO/IEC 29500-1 1st Edition]
17.3.1.12 ind (Paragraph Indentation)
This element specifies the set of indentation properties applied to the current paragraph.
Indentation settings are overriden on an individual basis - if any single attribute on 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 any single attribute on this element is never specified in the style hierarchy, then no indentation of that indentation type is applied to the paragraph.
[Example: Consider a paragraph which should have a one inch indentation from the text margins on both the left and the right sides, except for the first line in each paragraph, which should only be indented one quarter of an inch from the text margin (on the side which begins the flow of text for this paragraph). This set of indentations is specified using the following WordprocessingML:
<w:pPr> <w:ind w:left="1440" w:right="1440" w:hanging="1080" /> </w:pPr>
This set of indentation properties specifies that a 1440 twentieths of a point indentation should be provided on both the left and the right side of the text margins for this paragraph, and that a 1080 twentieths of a point hanging indent (towards the text margin) should be applied to the text in the first paragraph, giving it a net one-quarter inch indent from the text margin. end example]
Parent Elements |
---|
pPr (§17.3.1.26); pPr (§17.3.1.25); pPr (§17.7.5.2); pPr (§17.7.6.1); pPr (§17.9.23); pPr (§17.7.8.2) |
Attributes |
Description |
---|---|
end (End Indentation) |
Specifies the indentation which shall be placed at the end of this paragraph – between the right text margin for this paragraph and the right edge of that paragraph's content in a left to right paragraph, and the left text margin and the left edge of that paragraph's text in a right to left paragraph. If the mirrorIndents property (§17.3.1.18) is specified for this paragraph, then this indent is used for the outside page edge - the left page edge for odd numbered pages and the right page edge for even numbered pages. If this attribute is omitted, its value shall be assumed to be zero. All other values for this element are relative to the trailing text margin, Negative values are defined such that the text is moved past the text margin, positive values move the text inside the text margin. As well, if the endChars attribute is specified, then this value is ignored. [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:start="720" w:end="-1440" /> </w:pPr> This set of paragraph indentations specifies that this paragraph's text should be indented 1440 twentieths of a point (one inch) into the right text margin in this document, assuming this is a left to right paragraph. end example] The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type (§17.18.81). |
endChars (End Indentation in Character Units) |
Specifies the indentation which shall be placed at the end of this paragraph – between the right text margin for this paragraph and the right edge of that paragraph's content in a left to right paragraph, and the left text margin and the left edge of that paragraph's text in a right to left paragraph. If the mirrorIndents property (§17.3.1.18) is specified for this paragraph, then this indent is used for the outside page edge - the left page edge for odd numbered pages and the right page edge for even numbered pages. This value is specified in hundredths of a character unit. If this attribute is omitted, its value shall be assumed to be zero. All other values for this element are relative to the trailing text margin, negative values are defined such that the text is moved past the text margin, positive values move the text inside the text margin. As well, if the end attribute is specified, then its value is ignored, and is superseded by this value. [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:endChars="250" /> </w:pPr> This set of paragraph indentations specifies that this paragraph's text should be indented two and a half character units from the right text margin in this document, assuming this is a left to right paragraph. end example] The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10). |
firstLine (Additional First Line Indentation) |
Specifies the additional indentation which shall be applied to the first line of the parent paragraph. This additional indentation is specified relative to the paragraph indentation which is specified for all other lines in the parent paragraph. The firstLine and hanging attributes are mutually exclusive, if both are specified, then the firstLine value is ignored. If the firstLineChars attribute is also specified, then this value is ignored. If this attribute is omitted, then its value shall be assumed to be zero (if needed). [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:start="1440" w:end="720" w:firstLine="1440" /> </w:pPr> This set of indentations specifies that the first line should be indented 1440 twentieths of a point (one inch) from the indentation specified for all remaining paragraphs, which is the 1440 twentieths of a point, as specified by the start attribute. This gives the first line a two inch indentation from the text margin. end example] The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14). |
firstLineChars (Additional First Line Indentation in Character Units) |
Specifies the additional indentation which shall be applied to the first line of the parent paragraph. This additional indentation is specified relative to the paragraph indentation which is specified for all other lines in the parent paragraph. It is specified in one hundredths of a character unit. The firstLineChars and hangingChars attributes are mutually exclusive, if both are specified, then the firstLineChars value is ignored. If the firstLine attribute is also specified, then this value supersedes its other value. If this attribute is omitted, then its value shall be assumed to be zero (if needed). [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:start="1440" w:end="720" w:firstLineChars="140" /> </w:pPr> This set of indentations specifies that the first line should be indented 140 hundredths of a character units from the indentation specified for all remaining paragraphs, which is the 1440 twentieths of a point specified by the start attribute. end example] The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10). |
hanging (Indentation Removed from First Line) |
Specifies the indentation which shall be removed from the first line of the parent paragraph, by moving the indentation on the first line back towards the beginning of the direction of text flow. This indentation is specified relative to the paragraph indentation which is specified for all other lines in the parent paragraph. The firstLine and hanging attributes are mutually exclusive, if both are specified, then the firstLine value is ignored. If the hangingChars attribute is also specified, then this value is ignored. If this attribute is omitted, its value shall be assumed to be zero (if needed). [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:start="1440" w:end="720" w:hanging="720" /> </w:pPr> This set of indentations specifies that the first line should be indented 720 twentieths of a point (one inch) towards the text margin from the indentation specified for all remaining paragraphs, which is the 1440 twentieths of a point specified by the start attribute. This gives the first line a one-half inch indentation from the text margin. end example] The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14). |
hangingChars (Indentation Removed From First Line in Character Units) |
Specifies the indentation which shall be removed from the first line of the parent paragraph, by moving the indentation on the first line back towards the beginning of the direction of text flow. This indentation is specified relative to the paragraph indentation which is specified for all other lines in the parent paragraph. It is specified in one hundredths of a character unit. The firstLineChars and hangingChars attributes are mutually exclusive, if both are specified, then the firstLine value is ignored. If the hanging attribute is also specified, then its value is superseded by this value. If this attribute is omitted, its value shall be assumed to be zero (if needed). [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:start="1440" w:end="720" w:hangingChars="100" /> </w:pPr> This set of indentations specifies that the first line should be indented one character unit towards the text margin from the indentation specified for all remaining paragraphs, which is the 1440 twentieths of a point specified by the start attribute. end example] The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10). |
start (Start Indentation) |
Specifies the indentation which shall be placed at the start of this paragraph – between the left text margin for this paragraph and the left edge of that paragraph's content in a left to right paragraph, and the right text margin and the right edge of that paragraph's text in a right to left paragraph. If the mirrorIndents property (§17.3.1.18) is specified for this paragraph, then this indent is used for the inside page edge - the right page edge for odd numbered pages and the left page edge for even numbered pages. If this attribute is omitted, its value shall be assumed to be zero. All other values for this element are relative to the leading text margin, Negative values are defined such that the text is moved past the text margin, positive values move the text inside the text margin. This value can be superseded for the first line only via use of the firstLine or hanging attributes. As well, if the startChars attribute is specified, then this value is ignored. [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:start="720" w:end="2880" /> </w:pPr> This set of paragraph indentations specifies that this paragraph's text should be indented 720 twentieths of a point (one half inch) from the left text margin in this document, assuming this is a left to right paragraph. end example] The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type (§17.18.81). |
startChars (Start Indentation in Character Units) |
Specifies the indentation which shall be placed at the start of this paragraph – between the left text margin for this paragraph and the left edge of that paragraph's content in a left to right paragraph, and the right text margin and the right edge of that paragraph's text in a right to left paragraph. If the mirrorIndents property (§17.3.1.18) is specified for this paragraph, then this indent is used for the inside page edge - the right page edge for odd numbered pages and the left page edge for even numbered pages. This value is specified in hundredths of a character unit. If this attribute is omitted, its value shall be assumed to be zero. All other values for this element are relative to the leading text margin, Negative values are defined such that the text is moved past the text margin, positive values move the text inside the text margin. This value can be superseded for the first line only via use of the firstLine or hanging attributes. As well, if the start attribute is specified, then its value is ignored, and is superseded by this value. [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:ind w:startChars="250" /> </w:pPr> This set of paragraph indentations specifies that this paragraph's text should be indented two and a half character units from the left text margin in this document, assuming this is a left to right paragraph. end example] The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10). |
[Note: The W3C XML Schema definition of this element’s content model (CT_Ind) 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.