RTF has two ways of writing bulleted and numbered paragraphs. Word 6.0 and 95 store the
numbering with each paragraph, in a \pn group. Word 97 and later keep it in
two document-wide tables in the header,
the list table and the list override table, which work like a style sheet: each
paragraph only names an entry. Writers also put the finished number in as plain text
(\listtext or \pntext), so that readers that know neither
system still show it.
List table
The list table is a list of lists. Each list has properties for the whole list and one or nine levels.
<listtable> = '{' \*\listtable <list>+ '}'
<list> = \list \listtemplateid & (\listsimple | \listhybrid)? & <listlevel>+ & \listrestarthdn
& \listid & (\listname #PCDATA ';')
<listlevel> = <number> <justification> & \leveljcn? & \levelstartat
& (\levelold & \levelprev? & \levelprevspace? & \levelspace? & \levelindent?)?
& <leveltext> & <levelnumbers> & \levelfollow & \levellegal? & \levelnorestart?
& <chrfmt>? & \li? & \fi? & (\jclisttab \tx)?
<number> = \levelnfc | \levelnfcn | (\levelnfc & \levelnfcn)
<justification> = \leveljc | \leveljcn | (\leveljc & \leveljcn)
<leveltext> = '{' \leveltext \leveltemplateid? #SDATA ';' '}'
<levelnumbers> = '{' \levelnumbers #SDATA ';' '}'
List properties
| Control word | Meaning |
|---|---|
\listtable | Destination: the list table, written {\*\listtable …}. |
\list | Destination: one list. |
\listidN | The list’s unique ID, a randomly made long integer. Must not be −1 to −5. |
\listtemplateidN | The list’s template ID, also random and unique. Must not be −1. |
\listsimpleN | 1: the list has one level. 0 (default): it has nine. |
\listhybrid | The list has nine levels, each like a simple list with its own ID (\leveltemplateid). Word 2000 writes this; Word 97 wrote simple or multilevel lists. Only one of \listsimple and \listhybrid is written. |
\listrestarthdnN | 1: the list restarts at each section. For Word 7.0 compatibility only. |
\listname | Destination: the list’s name, ending in a semicolon, so that ListNum fields can name the list. |
\listlevel | Destination: one level of the list. |
Level properties
| Control word | Meaning |
|---|---|
\levelstartatN | The number the level starts at. |
\levelnfcN | The number format: see number formats. |
\levelnfcnN | The same values as \levelnfc, and takes priority over it. Added in Word 2000 because Hebrew and Arabic versions of Word 97 read \levelnfc differently; \levelnfc is still written for old readers. |
\leveljcN | Alignment of the number: 0 left, 1 centre, 2 right. |
\leveljcnN | Alignment relative to the reading direction: 0 left in left-to-right paragraphs and right in right-to-left ones, 1 centre, 2 right in left-to-right and left in right-to-left. Word 2000 prefers it to \leveljc but writes both. |
\leveloldN | 1: the level was converted from Word 6.0 or 7.0. 0: a native Word 97–2000 level. The next four words are valid only when this is written. |
\levelprevN | 1: the level includes the previous level’s text (Word 7.0 compatibility). |
\levelprevspaceN | 1: the level includes the previous level’s indent (Word 7.0 compatibility). |
\levelindentN | Minimum distance from the left indent to the start of the text (Word 7.0 compatibility). |
\levelspaceN | Minimum distance from the right edge of the number to the start of the text (Word 7.0 compatibility). |
\leveltext | Destination: the number’s text. In a hybrid list it starts with \leveltemplateidN. See level text. |
\leveltemplateidN | The level’s unique ID in a hybrid list, random, not −1 to −5. |
\levelnumbers | Destination: the positions of the placeholders in \leveltext. |
\levelfollowN | What follows the number: 0 a tab, 1 a space, 2 nothing. |
\levellegalN | 1: show the numbers of higher levels in Arabic numerals (legal numbering). 0: each in its own level’s format. |
\levelnorestartN | 1: the level does not restart when a higher level’s number changes. 0: it restarts. |
\jclisttab | Marks a tab stop (\txN) in a level as the list tab. A level may also carry \li and \fi indents and any character formatting, which apply to every paragraph at that level. |
Level text and level numbers
\leveltext holds a length-prefixed string. The first character is the
length; the placeholders \'00 to \'08 stand for the current
numbers of levels 1 to 9. \levelnumbers lists the 1-based positions of
the placeholders in that string. For the third-level number “1.1.1.”:
{\leveltext \leveltemplateid67698713 \'06\'00.\'01.\'02.;}
{\levelnumbers \'01\'03\'05;}
\'06 is the length (six characters), \'00,
\'01 and \'02 are the numbers of levels 1, 2 and 3, the full
stops are text, and the placeholders are at positions 1, 3 and 5. A bullet level has
one character, the bullet itself, for example {\leveltext \'01\'b7;} with
a symbol font set on the level, and an empty \levelnumbers.
Number formats
Values of \levelnfcN and \levelnfcnN (also used in the
revision array \pnrnfc below). The names in brackets are Word’s field
switches for the same format.
| N | Format |
|---|---|
| 0 | Arabic numerals (1, 2, 3) |
| 1 | Upper-case Roman (I, II, III) |
| 2 | Lower-case Roman (i, ii, iii) |
| 3 | Upper-case letters (A, B, C) |
| 4 | Lower-case letters (a, b, c) |
| 5 | Ordinal numbers (1st, 2nd, 3rd) |
| 6 | Cardinal text (One, Two, Three) |
| 7 | Ordinal text (First, Second, Third) |
| 10 | Kanji numbering without the digit character (*dbnum1) |
| 11 | Kanji numbering with the digit character (*dbnum2) |
| 12 | 46 phonetic katakana characters in “aiueo” order (*aiueo) |
| 13 | 46 phonetic katakana characters in “iroha” order (*iroha) |
| 14 | Double-byte character |
| 15 | Single-byte character |
| 16 | Kanji numbering 3 (*dbnum3) |
| 17 | Kanji numbering 4 (*dbnum4) |
| 18 | Circle numbering (*circlenum) |
| 19 | Double-byte Arabic numerals |
| 20 | 46 phonetic double-byte katakana characters, “aiueo” order (*aiueo*dbchar) |
| 21 | 46 phonetic double-byte katakana characters, “iroha” order (*iroha*dbchar) |
| 22 | Arabic numerals with a leading zero (01, 02, … 10, 11) |
| 23 | Bullet: no number at all |
| 24 | Korean numbering 2 (*ganada) |
| 25 | Korean numbering 1 (*chosung) |
| 26 | Chinese numbering 1 (*gb1) |
| 27 | Chinese numbering 2 (*gb2) |
| 28 | Chinese numbering 3 (*gb3) |
| 29 | Chinese numbering 4 (*gb4) |
| 30 | Chinese zodiac numbering 1 (*zodiac1) |
| 31 | Chinese zodiac numbering 2 (*zodiac2) |
| 32 | Chinese zodiac numbering 3 (*zodiac3) |
| 33 | Taiwanese double-byte numbering 1 |
| 34 | Taiwanese double-byte numbering 2 |
| 35 | Taiwanese double-byte numbering 3 |
| 36 | Taiwanese double-byte numbering 4 |
| 37 | Chinese double-byte numbering 1 |
| 38 | Chinese double-byte numbering 2 |
| 39 | Chinese double-byte numbering 3 |
| 40 | Chinese double-byte numbering 4 |
| 41 | Korean double-byte numbering 1 |
| 42 | Korean double-byte numbering 2 |
| 43 | Korean double-byte numbering 3 |
| 44 | Korean double-byte numbering 4 |
| 45 | Hebrew non-standard decimal |
| 46 | Arabic Alif Ba Tah |
| 47 | Hebrew Biblical standard |
| 48 | Arabic Abjad style |
| 255 | No number |
Values 8, 9 and 49 to 254 are not defined in the 1.6 specification. Later specifications add more formats; they are not listed here because those specifications are only published as Word documents, which this site has not checked.
List override table
Paragraphs do not name a list directly: they name an entry in the list override table, which names a list. Most overrides change nothing and only add this step. The others either change the formatting of some levels, so that paragraphs are numbered with the list but look different, or change the start value, so that they look the same but number from somewhere else. The first paragraph with an override takes its start value, and the paragraphs after it continue from there.
{\*\listoverridetable
{\listoverride\listid1123943171\listoverridecount0\ls1}
}
| Control word | Meaning |
|---|---|
\listoverridetable | Destination: the list override table, written {\*\listoverridetable …}. |
\listoverride | Destination: one override. |
\listidN | The \listid of a list in the list table. |
\listoverridecountN | The number of override levels that follow. The specification says this should be 1 or 9, matching a simple or a nine-level list; files written by Word commonly have 0 when no level is overridden. |
\lsN | The override’s number, counting from 1, which paragraphs use. Unique, never 0, from 1 to 2,000. |
\lfolevel | Destination: one override level. |
\listoverridestartat | This level’s start value is overridden. If only the start value is overridden, a \levelstartatN follows in the \lfolevel; if the format is overridden too, it goes in the \listlevel inside it. The specification’s index lists it as \listoverridestartN, a value word. |
\listoverrideformatN | This level’s format is overridden, and the \lfolevel contains a complete \listlevel. The specification describes N as the number of override levels, 1 or 9. |
List paragraphs (Word 97 and later)
| Control word | Meaning |
|---|---|
\lsN | The paragraph belongs to the list of override N. |
\ilvlN | The paragraph’s level, counting from 0: always 0 in a simple list, 0 to 8 in a nine-level list. |
\listtext | Destination: the number as plain text with its character formatting. A reader that understands lists ignores the whole group. |
{\listtext\pard\plain \f3 \'b7\tab}\pard \fi-360\li720\ls1\ilvl0 First item\par
Paragraph numbering (Word 6.0 and 95)
In the older system each numbered paragraph carries a {\*\pn …} group,
and before it a {\pntext …} group with the number as text, which readers
that understand \pn ignore. A section can set a default for each level
with {\*\pnseclvlN …}.
<pn> = <pnseclvl> | <pnpara>
<pnseclvl> = '{\*' \pnseclvl <pndesc> '}'
<pnpara> = <pntext> <pnprops>
<pntext> = '{' \pntext <char> '}'
<pnprops> = '{\*' \pn <pnlevel> <pndesc> '}'
<pnlevel> = \pnlvl | \pnlvlblt | \pnlvlbody | \pnlvlcont
<pndesc> = <pnnstyle> & <pnchrfmt> & <pntxtb> & <pntxta> & <pnfmt>
<pnchrfmt> = \pnf? & \pnfs? & \pnb? & \pni? & \pncaps? & \pnscaps? & <pnul>? & \pnstrike? & \pncf?
<pnul> = \pnul | \pnuld | \pnuldb | \pnulnone | \pnulw
<pnfmt> = \pnnumonce? & \pnacross? & \pnindent? & \pnsp? & \pnprev? & <pnjust>? & \pnstart?
& \pnhang? & \pnrestart?
<pnjust> = \pnqc | \pnql | \pnqr
<pntxtb> = '{' \pntxtb #PCDATA '}'
<pntxta> = '{' \pntxta #PCDATA '}'
Group and level
| Control word | Meaning |
|---|---|
\pntext | Destination: the generated number or bullet as text, with its formatting. Comes before the \pn group. |
\pn | Destination: turns on numbering for the paragraph. |
\pnseclvlN | Destination (section property): the default numbering for level N in multilevel lists in this section. |
\pnlvlN | Level 1 to 9 of a multilevel list. The default comes from \pnseclvl. |
\pnlvlblt | A bulleted paragraph (level 11). The bullet character is in \pntxtb. |
\pnlvlbody | Simple numbering (level 10). |
\pnlvlcont | Continue numbering but show no number (“skip numbering”). |
\pntxtb | Destination: text before the number. For a bullet, the bullet. |
\pntxta | Destination: text after the number. |
Text before and after together may be at most 32 characters in simple numbering, and 64 across all levels in multilevel numbering.
Number style
| Control word | Style |
|---|---|
\pncard | Cardinal text (One, Two, Three) |
\pndec | Decimal (1, 2, 3) |
\pnucltr | Upper-case letters (A, B, C) |
\pnucrm | Upper-case Roman (I, II, III) |
\pnlcltr | Lower-case letters (a, b, c) |
\pnlcrm | Lower-case Roman (i, ii, iii) |
\pnord | Ordinal (1st, 2nd, 3rd) |
\pnordt | Ordinal text (First, Second, Third) |
\pnbidia | Abjad Jawaz if the language is Arabic, Biblical standard if Hebrew |
\pnbidib | Alif Ba Tah if the language is Arabic, non-standard decimal if Hebrew |
\pnaiu | 46 phonetic katakana characters in “aiueo” order (*aiueo) |
\pnaiud | 46 phonetic double-byte katakana characters (*aiueo*dbchar) |
\pnaiueo | 46 phonetic katakana characters in “aiueo” order (*aiueo) |
\pnaiueod | 46 phonetic double-byte katakana characters (*aiueo*dbchar) |
\pniroha | 46 phonetic katakana characters in “iroha” order (*iroha) |
\pnirohad | 46 phonetic double-byte katakana characters in “iroha” order (*iroha*dbchar) |
\pnchosung | Korean numbering (*chosung) |
\pnganada | Korean numbering (*ganada) |
\pncnum | Numbers in circles, up to 20 (*circlenum) |
\pndbnum | Kanji numbering without the digit character (*dbnum1) |
\pndbnumd | Kanji numbering with the digit character (*dbnum2) |
\pndbnumt | Kanji numbering 3 (*dbnum3) |
\pndbnuml | Kanji numbering 3 (*dbnum3), as the specification gives it |
\pndbnumk | Kanji numbering 4 (*dbnum4) |
\pndecd | Double-byte decimal (*arabic*dbchar) |
\pngbnum | Chinese numbering 1 (*gb1) |
\pngbnumd | Chinese numbering 2 (*gb2) |
\pngbnuml | Chinese numbering 3 (*gb3) |
\pngbnumk | Chinese numbering 4 (*gb4) |
\pnzodiac | Chinese zodiac numbering 1 (*zodiac1) |
\pnzodiacd | Chinese zodiac numbering 2 (*zodiac2) |
\pnzodiacl | Chinese zodiac numbering 3 (*zodiac3) |
The specification lists \pnganada twice, as Korean numbering 1 and 2,
and calls \pnchosung Korean numbering 2; in the page-number and footnote
words (\pgnchosung, \ftnnchosung) chosung is
Korean numbering 1 and ganada Korean numbering 2, as in the
number format table.
Number formatting and placement
Words marked toggle can be turned off with 0.
| Control word | Meaning |
|---|---|
\pnfN | Font of the number (font table index). |
\pnfsN | Font size of the number, in half-points. |
\pnb | Bold number. Toggle. |
\pni | Italic number. Toggle. |
\pncaps | All capitals. Toggle. |
\pnscaps | Small capitals. Toggle. |
\pnstrike | Strikethrough. Toggle. |
\pncfN | Colour of the number (colour table index; default 0). |
\pnul | Continuous underline. Toggle. |
\pnuld | Dotted underline. |
\pnuldb | Double underline. |
\pnulnone | No underline. |
\pnulw | Word underline (words only, not spaces). |
\pnuldash | Dashed underline. |
\pnuldashd | Dash-dot underline. |
\pnuldashdd | Dash-dot-dot underline. |
\pnulhair | Hairline underline. |
\pnulth | Thick underline. |
\pnulwave | Wave underline. |
\pnnumonce | Number each table cell only once (default: every paragraph in a table). |
\pnacross | Number across table rows (default: down columns). |
\pnhang | The paragraph has a hanging indent. |
\pnrestart | Restart numbering after each section break; used only with heading numbering. |
\pnindentN | Minimum distance from the margin to the body text. |
\pnspN | Distance from the number to the body text. |
\pnprev | Include the previous level’s number (1, 1.1, 1.1.1). |
\pnqc | Centre the number. |
\pnql | Left-align the number. |
\pnqr | Right-align the number. |
\pnstartN | Start at number N. |
{\pntext\f1\'b7\tab}{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\fi-360\li360 First item\par
Revision marks for numbers
When changes are tracked, a paragraph number keeps its “old” value, the value it had when tracking started. Word compares it with the current number: if they differ, the old one is shown deleted and the new one inserted.
| Control word | Meaning |
|---|---|
\pnrauthN | Author of the number revision: entry N in the revision table. |
\pnrdateN | Time of the revision, a DTTM as a long integer. |
\pnrnot | The paragraph number is marked as inserted. |
\pnrstartN | Starts one of the four arrays: 0 \pnrxst, 1 \pnrrgb, 2 \pnrnfc, 3 \pnrpnbr. |
\pnrstopN | Ends the array; N is the number of bytes written. |
\pnrxstN | One byte of the old number’s text: a length, then up to 32 Unicode characters, two bytes each (high byte first), with level placeholders written as the values 0 to 8. |
\pnrrgbN | One byte of the nine-item array of placeholder positions in the text. |
\pnrnfcN | One byte of the nine-item array of number formats, one short integer (two bytes) per level, values as \levelnfc. |
\pnrpnbrN | One byte of the nine-item array of the number’s values at each level, one long integer (four bytes) per level. |
\dfrauthN | Author of the deleted value of a ListNum field. |
\dfrdateN | Time of that revision (DTTM). |
\dfrstartN | Starts the \dfrxst array. |
\dfrxstN | One byte of the deleted value: a length, then Unicode characters, two bytes each. |
\dfrstopN | Ends the array; N is the number of bytes. |
Each array is written as one control word per byte. The specification’s example is
the third-level number “3-4b.”: text \'00-\'01\'02. of length 5,
placeholders at 1, 3 and 4, formats Arabic, Arabic and lower-case letter (0, 0, 4), and
values 3, 4 and 2:
\pnrstart0
\pnrxst0\pnrxst5\pnrxst0\pnrxst1\pnrxst0\pnrxst45
\pnrxst0\pnrxst2\pnrxst0\pnrxst3\pnrxst0\pnrxst46
\pnrstop12
\pnrstart1
\pnrrgb1\pnrrgb3\pnrrgb4\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0
\pnrstop9
\pnrstart2
\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc4 …twelve more \pnrnfc0…
\pnrstop18
\pnrstart3
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr3
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr4
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr2 …six more levels of four \pnrpnbr0…
\pnrstop36
In the text array every unit, the length included, is two bytes with the high byte
first: length 5, then 1, “-” (45), 2, 3 and “.” (46), twelve bytes in all. The example
writes the level placeholders as 1, 2 and 3, although the description says 0 to 8; it
is reproduced as printed. The deleted ListNum value is written
\dfrstart0\dfrxst0\dfrxst5\dfrxst0\dfrxst51\dfrxst0\dfrxst45\dfrxst0\dfrxst52 \dfrxst0\dfrxst66\dfrxst0\dfrxst46\dfrstop10:
length 5, then “3” (51), “-” (45), “4” (52), 66 and “.” (46). As printed, 66 is a
capital “B” and the stop count says 10 for twelve bytes.