[Table of Contents] [docx version]
WordprocessingML Reference Material - Table of Contents
lnNumType (Line Numbering Settings)
This element specifies the settings for line numbering to be displayed before each column of text in this section in the document.
[Example: Consider the line numbering used on each page of this document, which specifies: line numbering for each line, restarting at one at the top of each new page. This line-numbering scheme would be defined using the following WordprocessingML:
<w:sectPr>
…
<w:lnNumType w:countBy="1" />
</w:sectPr>
This content specifies that line numbers shall be included on each line, restart on each page (the default), be placed automatically based on the text (the default), and shall restart at one (the default). end example]
Parent Elements |
Attributes |
Description |
countBy (Line Number Increments to Display) |
Specifies the line number increments to be displayed in the current document.
Although each line has an associated line number, only lines which are an even multiple of this value shall be displayed.
[Example: Consider a document in which only every fifth line shall have a line number. The resulting WordprocessingML for this setting would be:
<w:lnNumType … w:countBy="5"/>
This setting ensures that only lines whose number is a multiple of (e.g. 5, 10, and 15) will have a line number displayed. end example]
The possible values for this attribute are defined by the ST_DecimalNumber simple type (§2.18.16). |
distance (Distance Between Text and Line Numbering) |
Specifies the distance between the text margin and the edge of any line numbers appearing in that section.
[Example: Consider a document in which the line numbering shall appear one-half inch from the text margin. The WordprocessingML for this setting is:
<w:lnNumType … w:distance="720"/>
The distance attribute specifies that there shall be a 720 twip spacing between the text margin and the line numbering. end example]
The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§2.18.105). |
restart (Line Numbering Restart Setting) |
Specifies when the line numbering in this section shall be reset to the line number specified by the start attribute's value.
The line numbering increments for each line (even if it is not displayed) until it reaches the restart point specified by this element.
[Example: Consider the line numbering used on each page of this document, which specifies that line numbering shall restart at the top of each new page. This line numbering setting would be defined using the following WordprocessingML:
<w:sectPr>
The value of newPage specifies that the line numbers shall restart at the top of each page to the value specified by the start attribute. In this case, newPage is the default, so this value could have been omitted entirely. end example]
The possible values for this attribute are defined by the ST_LineNumberRestart simple type (§2.18.54). |
Specifies the starting value used for the first line whenever the line numbering is restarted by use of the restart attribute.
[Example: Consider a document in which line numbering shall appear on every fifth line, but the first line shall be treated as line number . This setting would require the following WordprocessingML syntax:
<w:lnNumType w:start="3" w:countBy="5"/>
The start attribute specifies that line numbers shall be counted starting from the number 3. end example]
The possible values for this attribute are defined by the ST_DecimalNumber simple type (§2.18.16). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_LineNumber">
<attribute name="countBy" type="ST_DecimalNumber" use="optional"/>
<attribute name="start" type="ST_DecimalNumber" use="optional"/>
<attribute name="distance" type="ST_TwipsMeasure" use="optional"/>
<attribute name="restart" type="ST_LineNumberRestart" use="optional"/>
</complexType>