The header has the following syntax:
<header>\rtf <charset> \deff? <fonttbl> <filetbl>? <colortbl>? <stylesheet>? <listtables>? <revtbl>?
Each of the various header tables should appear, if they exist, in the above order. Document properties can occur before and between the header tables. A property must be defined before being referenced. Specifically:
An entire RTF file is considered a group and must be enclosed in braces. The \rtfN control word must follow the opening brace. The numeric parameter N identifies the major version of the RTF Specification used. The RTF standard described in this RTF Specification, although titled as version 1.6, continues to correspond syntactically to RTF Specification version 1. Therefore, the numeric parameter N for the \rtf control word should still be emitted as 1.
After specifying the RTF version, you must declare the character set used in this document. The control word for the character set must precede any plain text or any table control words. The RTF Specification currently supports the following character sets.
Control Word |
Character set |
\ansi | ANSI (the default) |
\mac | Apple Macintosh |
\pc | IBM PC code page 437 |
\pca | IBM PC code page 850, used by IBM Personal System/2 (not implemented in version 1 of Microsoft Word for OS/2) |
Word 2000 is a Unicode-enabled application. Text is handled using the 16-bit Unicode character encoding scheme. Expressing this text in RTF requires a new mechanism, because until this release (version 1.6), RTF has only handled 7-bit characters directly and 8-bit characters encoded as hexadecimal. The Unicode mechanism described here can be applied to any RTF destination or body text.
Control Word |
Meaning |
\ansicpgN | This keyword represents the ANSI code page that is used to perform the Unicode to ANSI conversion when writing RTF text. N represents the code page in decimal. This is typically set to the default ANSI code page of the run-time environment (for example \ansicpg1252 for U.S. Windows). The reader can use the same ANSI code page to convert ANSI text back to Unicode. Possible values include:
437United States IBM 708Arabic (ASMO 708) 709Arabic (ASMO 449+, BCON V4) 710Arabic (transparent Arabic) 711Arabic (Nafitha Enhanced) 720Arabic (transparent ASMO) 819Windows 3.1 (United States and Western Europe) 850IBM multilingual 852Eastern European 860Portuguese 862Hebrew 863French Canadian 864Arabic 865Norwegian 866Soviet Union 874Thai 932Japanese 936Simplified Chinese 949Korean 950Traditional Chinese 1250Windows 3.1 (Eastern European) 1251Windows 3.1 (Cyrillic) 1252Western European 1253Greek 1254Turkish 1255Hebrew 1256Arabic 1257Baltic 1258Vietnamese 1361Johab This keyword should be emitted in the RTF header section right after the \ansi, \mac, \pc or \pca keyword. |
\upr | This keyword represents a destination with two embedded destinations, one represented using Unicode and the other using ANSI. This keyword operates in conjunction with the \ud keyword to provide backward compatibility. The general syntax is as follows:
{\upr{keyword ansi_text}{\*\ud{keyword Unicode_text}}} Notice that this keyword-destination does not use the \* keyword; this forces the old RTF readers to pick up the ANSI representation and discard the Unicode one. |
\ud | This is a destination that is represented in Unicode. The text is represented using a mixture of ANSI translation and use of \uN keywords to represent characters that do not have the exact ANSI equivalent. |
\uN | This keyword represents a single Unicode character that has no equivalent ANSI representation based on the current ANSI code page. N represents the Unicode character value expressed as a decimal number.
This keyword is followed immediately by equivalent character(s) in ANSI representation. In this way, old readers will ignore the \uN keyword and pick up the ANSI representation properly. When this keyword is encountered, the reader should ignore the next N characters, where N corresponds to the last \ucN value encountered. As with all RTF keywords, a keyword-terminating space may be present (before the ANSI characters) that is not counted in the characters to skip. While this is not likely to occur (or recommended), a \bin keyword, its argument, and the binary data that follows are considered one character for skipping purposes. If an RTF scope delimiter character (that is, an opening or closing brace) is encountered while scanning skippable data, the skippable data is considered to be ended before the delimiter. This makes it possible for a reader to perform some rudimentary error recovery. To include an RTF delimiter in skippable data, it must be represented using the appropriate control symbol (that is, escaped with a backslash,) as in plain text. Any RTF control word or symbol is considered a single character for the purposes of counting skippable characters. An RTF writer, when it encounters a Unicode character with no corresponding ANSI character, should output \uN followed by the best ANSI representation it can manage. Also, if the Unicode character translates into an ANSI character stream with count of bytes differing from the current Unicode Character Byte Count, it should emit the \ucN keyword prior to the \uN keyword to notify the reader of the change. RTF control words generally accept signed 16-bit numbers as arguments. For this reason, Unicode values greater than 32767 must be expressed as negative numbers. |
\ucN | This keyword represents the number of bytes corresponding to a given \uN Unicode character. This keyword may be used at any time, and values are scoped like character properties. That is, a \ucN keyword applies only to text following the keyword, and within the same (or deeper) nested braces. On exiting the group, the previous \uc value is restored. The reader must keep a stack of counts seen and use the most recent one to skip the appropriate number of characters when it encounters a \uN keyword. When leaving an RTF group that specified a \uc value, the reader must revert to the previous value. A default of 1 should be assumed, if no \uc keyword has been seen in the current or outer scopes.
A common practice is to emit no ANSI representation for Unicode characters within a Unicode destination context (that is, inside a \ud destination.). Typically, the destination will contain a \uc0 control sequence. There is no need to reset the count on leaving the \ud destination as the scoping rules will ensure the previous value is restored. |
Document text should be emitted as ANSI characters. If there are Unicode characters that do not have corresponding ANSI characters, they should be output using the \ucN and \uN keywords.
For example, the text LabΓValue (Unicode characters 0x004c, 0x0061, 0x0062, 0x0393, 0x0056, 0x0061, 0x006c, 0x0075, 0x0065) should be represented as follows (assuming a previous \ucl):
Lab\u915Gvalue
Destination text is defined as any text represented in an RTF destination. A good example is the bookmark name in the \bkmkstart destination.
Any destination containing Unicode characters should be emitted as two destinations within a \upr destination to ensure that old readers can read it properly and that no Unicode character encoding is lost when read with a new reader.
For example, a bookmark name LabΓValue (Unicode characters 0x004c, 0x0061, 0x0062, 0x0393, 0x0056, 0x0061, 0x006c, 0x0075, 0x0065) should be represented as follows:
{\upr{\*\bkmkstart LabGValue}{\*\ud{\*\bkmkstart Lab\u915 Value}}}
The first sub-destination contains only ANSI characters and is the representation that old readers will see. The second sub-destination is a \*\ud destination that contains a second copy of the \bkmkstart destination. This copy can contain Unicode characters and is the representation that Unicode-aware readers must pay attention to, ignoring the ANSI-only version.
The \fonttbl control word introduces the font table group. Unique \fN control words define each font available in the document, and are used to reference that font throughout the document. This group has the syntax listed in the following table.
<fonttbl> | '{' \fonttbl (<fontinfo> | ('{' <fontinfo> '}'))+ '}' |
<fontinfo> | <fontnum> <fontfamily> <fcharset>? <fprq>? <panose>? <nontaggedname>? <fontemb>? <codepage>? <fontname> <fontaltname>? ';' |
<fontnum> | \f |
<fontfamily> | \fnil | \froman | \fswiss | \fmodern | \fscript | \fdecor | \ftech | \fbidi |
<fcharset> | \fcharset |
<fprq> | \fprq |
<panose> | <data> |
<nontaggedname> | \*\fname |
<fontname> | #PCDATA |
<fontaltname> | '{\*' \falt #PCDATA '}' |
<fontemb> | '{\*' \fontemb <fonttype> <fontfname>? <data>? '}' |
<fonttype> | \ftnil | \fttruetype |
<fontfname> | '{\*' \fontfile <codepage>? #PCDATA '}' |
<codepage> | \cpg |
Note For <fontemb>, either <fontfname> or <data> must be present, although both may be present.
All fonts available to the RTF writer can be included in the font table, even if the document doesn't use all the fonts.
RTF also supports font families, so that applications can attempt to intelligently choose fonts if the exact font is not present on the reading system. RTF uses the following control words to describe the various font families.
Control Word |
Font Family | Examples |
\fnil | Unknown or default fonts (the default) | |
\froman | Roman, proportionally spaced serif fonts | Times New Roman, Palatino |
\fswiss | Swiss, proportionally spaced sans serif fonts | Arial |
\fmodern | Fixed-pitch serif and sans serif fonts | Courier New, Pica |
\fscript | Script fonts | Cursive |
\fdecor | Decorative fonts | Old English, ITC Zapf Chancery |
\ftech | Technical, symbol, and mathematical fonts | Symbol |
\fbidi | Arabic, Hebrew, or other bidirectional font | Miriam |
If an RTF file uses a default font, the default font number is specified with the \deffN control word, which must precede the font-table group. The RTF writer supplies the default font number used in the creation of the document as the numeric argument N. The RTF reader then translates this number through the font table into the most similar font available on the reader's system.
The following control words specify the character set, alternative font name, pitch of a font in the font table, and non-tagged font name.
Control Word |
Definition |
\fcharsetN | Specifies the character set of a font in the font table. Values for N are defined by Windows header files:
0ANSI 1Default 2Symbol 3Invalid 77Mac 128Shift Jis 129Hangul 130Johab 134GB2312 136Big5 161Greek 162Turkish 163Vietnamese 177Hebrew 178Arabic 179Arabic Traditional 180Arabic user 181Hebrew user 186Baltic 204Russian 222Thai 238Eastern European 254PC 437 255OEM |
\falt | Indicates alternate font name to use if the specified font in the font table is not available. '{\*' \falt <Alternate Font Name>'}' |
\fprqN | Specifies the pitch of a font in the font table. |
\*\panose | Destination keyword. This destination contains a 10-byte Panose 1 number. Each byte represents a single font property as described by the Panose 1 standard specification. |
\*\fname | This is an optional control word in the font table to define the non-tagged font name. This is the actual name of the font without the tag, used to show which character set is being used. For example, Arial is a non-tagged font name, and Arial (Cyrillic) is a tagged font name. This control word is used by WordPad. Word ignores this control word (and never creates it). |
\fbiasN | Used to arbitrate between two fonts when a particular character can exist in either non-Far East or Far East font. Word 97-2000 emits the \fbiasN keyword only in the context of bullets or list information (that is, a \listlevel destination). The default value of 0 for N indicates a non-Far East font. A value of 1 indicates a Far East font. Additional values may be defined in future releases. |
If \fprq is specified, the N argument can be one of the following values.
Pitch | Value |
Default pitch | 0 |
Fixed pitch | 1 |
Variable pitch | 2 |
RTF supports embedded fonts with the \fontemb group located inside a font definition. An embedded font can be specified by a file name, or the actual font data may be located inside the group. If a file name is specified, it is contained in the \fontfile group. The \cpg control word can be used to specify the character set for the file name.
RTF supports TrueType® and other embedded fonts. The type of the embedded font is described by the following control words.
Control Word |
Embedded font type |
\ftnil | Unknown or default font type (the default) |
\fttruetype | TrueType font |
A font may have a different character set from the character set of the document. For example, the Symbol font has the same characters in the same positions both on the Macintosh and in Windows. RTF describes this with the \cpg control word, which names the character set used by the font. In addition, file names (used in field instructions and in embedded fonts) may not necessarily be the same as the character set of the document; the \cpg control word can change the character set for these file names as well. However, all RTF documents must still declare a character set (that is, \ansi, \mac, \pc, or \pca) to maintain backward compatibility with earlier RTF readers.
The table below describes valid values for \cpg.
Value | Description |
437 | United States IBM |
708 | Arabic (ASMO 708) |
709 | Arabic (ASMO 449+, BCON V4) |
710 | Arabic (transparent Arabic) |
711 | Arabic (Nafitha Enhanced) |
720 | Arabic (transparent ASMO) |
819 | Windows 3.1 (United States and Western Europe) |
850 | IBM multilingual |
852 | Eastern European |
860 | Portuguese |
862 | Hebrew |
863 | French Canadian |
864 | Arabic |
865 | Norwegian |
866 | Soviet Union |
874 | Thai |
932 | Japanese |
936 | Simplified Chinese |
949 | Korean |
950 | Traditional Chinese |
1250 | Windows 3.1 (Eastern European) |
1251 | Windows 3.1 (Cyrillic) |
1252 | Western European |
1253 | Greek |
1254 | Turkish |
1255 | Hebrew |
1256 | Arabic |
1257 | Baltic |
1258 | Vietnamese |
1361 | Johab |
The \filetbl control word introduces the file table destination. The only time a file table is created in RTF is when the document contains subdocuments. This group defines the files referenced in the document and has the following syntax:
<filetbl> | '{\*' \filetbl ('{' <fileinfo> '}')+ '}' |
<fileinfo> | \file <filenum><relpath>?<osnum>? <filesource>+ <file name> |
<filenum> | \fid |
<relpath> | \frelative |
<osnum> | \fosnum |
<filesource> | \fvalidmac | \fvaliddos | \fvalidntfs | \fvalidhpfs | \fnetwork |
<file name> | #PCDATA |
Note The file name can be any valid alphanumeric string for the named file system, indicating the complete path and file name.
Control Word |
Definition |
\filetbl | A list of documents referenced by the current document. The file table has a structure analogous to the style or font table. This is a destination control word output as part of the document header. |
\file | Marks the beginning of a file group that lists relevant information about the referenced file. This is a destination control word. |
\fidN | File ID number. Files are referenced later in the document using this number. |
\frelativeN | The character position within the path (starting at 0) where the referenced file's path starts to be relative to the path of the owning document. For example, if a document is saved to the path C:\Private\Resume\File1.doc and its file table contains the path C:\Private\Resume\Edu\File2.doc, then that entry in the file table will be \frelative18, to point at the character "e" in "edu". This allows preservation of relative paths. |
\fosnumN | Currently only filled in for paths from the Macintosh file system. It is an operating-system-specific number for identifying the file, which may be used to speed up access to the file, or find it if the file has been moved to another folder or disk. The Macintosh operating system name for this number is the "file id." Additional meanings of the \fosnumN control word may be defined for other file systems in the future. |
\fvalidmac | Macintosh file system. |
\fvaliddos | MS-DOS file system. |
\fvalidntfs | NTFS file system. |
\fvalidhpfs | HPFS file system. |
\fnetwork | Network file system. This control word may be used in conjunction with any of the previous file source control words. |
The \colortbl control word introduces the color table group, which defines screen colors, character colors, and other color information. This group has the following syntax:
<colortbl> | '{' \colortbl <colordef>+ '}' |
<colordef> | \red ? & \green ? & \blue ? ';' |
The following are valid control words for this group:
Control Word |
Meaning |
\redN | Red index |
\greenN | Green index |
\blueN | Blue index |
Each definition must be delimited by a semicolon, even if the definition is omitted. If a color definition is omitted, the RTF reader uses its default color. The example below defines the default color table used by Word. The first color is omitted, as shown by the semicolon following the \colortbl control word. The missing definition indicates that color 0 is the ''auto'' color.
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
\red0\green255\blue0;
\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;
\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;
\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
The foreground and background colors use indexes into the color table to define a color. For more information on color setup, see your Windows documentation.
The following example defines a block of text in color (where supported). Note that the cf/cb index is the index of an entry in the color table, which represents a red/green/blue color combination.
{\f1\cb1\cf2 This is colored text. The background is color
1 and the foreground is color 2.}
If the file is translated for software that does not display color, the reader ignores the color table group.
The \stylesheet control word introduces the style sheet group, which contains definitions and descriptions of the various styles used in the document. All styles in the document's style sheet can be included, even if not all the styles are used. In RTF, a style is a form of shorthand used to specify a set of character, paragraph, or section formatting.
The style-sheet group has the following syntax:
<stylesheet> | '{' \stylesheet <style>+ '}' |
<style> | '{' <styledef>?<keycode>? <formatting> <additive>? <based>? <next>? <autoupd>? <hidden>? <personal>? <compose>? <reply>? <stylename>? ';' '}' |
<styledef> | \s |\*\cs | \ds |
<keycode> | '{' \keycode <keys> '}' |
<keys> | ( \shift? & \ctrl? & \alt?) <key> |
<key> | \fn | #PCDATA |
<additive> | \additive |
<based> | \sbasedon |
<next> | \snext |
<autoupd> | \sautoupd |
<hidden> | \shidden |
<personal> | \spersonal |
<compose> | \scompose |
<reply> | \sreply |
<formatting> | (<brdrdef> | <parfmt> | <apoctl> | <tabdef> | <shading> | <chrfmt>)+ |
<stylename> | #PCDATA |
For <style>, both <styledef> and <stylename> are optional; the default is paragraph style 0. Note for <stylename> that Microsoft Word for the Macintosh interprets commas in #PCDATA as separating style synonyms. Also, for <key>, the data must be exactly one character.
Control Word |
Meaning |
\*\csN | Designates character style. Like \s, \cs is not a destination control word. However, it is important to treat it like one inside the style sheet; that is, \cs must be prefixed with \* and must appear as the first item inside a group. Doing so ensures that readers that do not understand character styles will skip the character style information correctly. When used in body text to indicate that a character style has been applied, do not include the \* prefix. |
\sN | Designates paragraph style. |
\dsN | Designates section style. |
\additive | Used in a character style definition ('{\*'\cs...'}'). Indicates that character style attributes are to be added to the current paragraph style attributes, rather than setting the paragraph attributes to only those defined in the character style definition. |
\sbasedonN | Defines the number of the style on which the current style is based (the default is 222—no style). |
\snextN | Defines the next style associated with the current style; if omitted, the next style is the current style. |
\sautoupd | Automatically update styles. |
\shidden | Style does not appear in the Styles drop-down list in the Style dialog box (on the Format menu, click Styles).
Note The hidden style property can only be accessed using Microsoft Visual Basic® for Applications. |
\spersonal | Style is a personal e-mail style |
\scompose | Style is the e-mail compose style |
\sreply | Style is the e-mail reply style |
\keycode | This group is specified within the description of a style in the style sheet in the RTF header. The syntax for this group is '{\*'\keycode <keys>'}' where <keys> are the characters used in the key code. For example, a style, Normal, may be defined {\s0 {\*\keycode \shift\ctrl n}Normal;} within the RTF style sheet. See the Special Character control words for the characters outside the alphanumeric range that may be used. |
\alt | The ALT modifier key. Used to describe shortcut-key codes for styles. |
\shift | The SHIFT modifier key. Used to describe shortcut-key codes for styles. |
\ctrl | The CTRL modifier key. Used to describe shortcut-key codes for styles. |
\fnN | Specifies a function key where N is the function key number. Used to describe shortcut-key codes for styles. |
The following is an example of an RTF style sheet:
{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}
{\*\cs10 \additive Default Paragraph Font;}{\*\cs15 \additive \b\ul\cf6
\sbasedon10 UNDERLINE;}{\s16\qc \li0\ri0\widctlpar\aspalpha\aspnum\faauto
\adjustright\rin0\lin0\itap0 \b\fs24\cf2\lang1033\langfe1033\cgrid\
langnp1033\langfenp1033 \sbasedon0 \snext16 \sautoupd CENTER;}}
and RTF paragraphs to which the styles are applied:
\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\
adjustright\rin0\lin0\itap0 \fs24
\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
{This is the Normal Style
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto
\adjustright\rin0\lin0\itap0 {\par }\pard\plain \s16\qc
\li0\ri0\widctlpar\aspalpha\aspnum\faauto\outlinelevel0
\adjustright\rin0\lin0\itap0 \b\fs24\cf2\lang1033\langfe1033\cgrid
\langnp1033\langfenp1033
{This is a centered paragraph with blue, bold font. I call the style CENTER.\par }
\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright
\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
{\par The word \'93}{\cs15\b\ul\cf6 style}
{\'94 is red and underlined. I used a style I called UNDERLINE.\par }
Some of the control words in this example are discussed in later sections. In the example, note that the properties of the style were emitted following the application of the style. This was done for two reasons: (1) to allow RTF readers that don't support styles to still retain all formatting; and, (2) to allow the additive model for styles, where additional property changes are "added" on top of the defined style. Some RTF readers may not "apply" a style upon only encountering the style number without the accompanying formatting information because of this.
Word 97 and 2000 store bullets and numbering information very differently from earlier versions of Word. In Word 6.0, for example, number formatting data is stored individually with each paragraph. From Word 97 onwards, however, all the formatting information is stored in a pair of document-wide list tables that act as a style sheet, and each individual paragraph stores only an index to one of the tables, like a style index.
There are two list tables in Word: the List table (destination \listtable), and the List Override table (destination \listoverridetable).
The first table Word stores is the List table. A List table is a list of lists (destination \list). Each list contains a number of list properties that pertain to the entire list, and a list of levels (destination \listlevel), each of which contains properties that pertain only to that level.
The syntax for the list table is the following:
<listtable> | '{' \*\listtable <list>+ '}' |
<list> | \list \listemplateid & (\listsimple | listhybrid)? & <listlevel>+ & \listrestarthdn & \listid & (\listname #PCDATA ';') |
<listlevel> | <number> <justification> & \leveljcnN? & \levelstartatN & (\leveloldN & \levelprevN? & \levelprevspaceN? & \levelspaceN? & \levelindentN?)? & <leveltext> & <levelnumbers> & \levelfollowN & \levellegalN? & \levelnorestartN? & <chrfmt>? & \li? & \fi? & (\jclisttab \tx)? |
<number> | \levelnfcN | \levelnfcnN | (\levelnfcN & \levelnfcnN) |
<justification> | \leveljcN | \leveljcnN | (\leveljcN & \leveljcnN) |
<leveltext> | '{' \leveltext \leveltemplateid? #SDATA ';' '}' |
<levelnumbers> | '{' \levelnumbers #SDATA ';' '}' |
Control Word |
Meaning |
\listidN | Each list must have a unique list ID that should be randomly generated. The value N is a long integer. The list ID cannot be between -1 and -5. |
\listtemplateidN | Each list should have a unique template ID as well, which also should be randomly generated. The template ID cannot be -1. The value N is a long integer. |
\listsimpleN | 1 if the list has one level; 0 (default) if the list has nine levels. |
\listhybrid | Present if the list is has 9 levels, each of which is the equivalent of a simple list. Only one of \listsimple and \listhybrid should be present. Word 2000 will write lists with the \listhybrid property. |
\listrestarthdnN | 1 if the list restarts at each section; 0 if not. Used for Word 7.0 compatibility only. |
\listname | The argument for \listname is a string that is the name of this list. Names allow ListNum fields to specify the list they belong to. This is a destination control word. |
While Word 97 emitted simple or multilevel lists (not simple), Word 2000 emits hybrid lists, which are essentially collections of simple lists. The main difference between Word 2000 hybrid lists and Word 97 multilevel ones is that each level of a hybrid list has a unique identifier.
Each list consists of either one or nine list levels depending upon whether the \listsimple flag is set. Each list level contains a number of properties that specify the formatting for that level, such as the start-at value, the text string surrounding the number, its justification and indents, and so on.
Control Word |
Meaning |
\levelstartatN | N specifies the start-at value for the level |
\levelnfcN | Specifies the number type for the level:
0Arabic (1, 2, 3) 1Uppercase Roman numeral (I, II, III) 2Lowercase Roman numeral (i, ii, iii) 3Uppercase letter (A, B, C) 4Lowercase letter (a, b, c) 5Ordinal number (1st, 2nd, 3rd) 6Cardinal text number (One, Two Three) 7Ordinal text number (First, Second, Third) 10Kanji numbering without the digit character (*dbnum1). 11Kanji numbering with the digit character (*dbnum2). 1246 phonetic Katakana characters in "aiueo" order (*aiueo). 1346 phonetic katakana characters in "iroha" order (*iroha). 14Double Byte character 15Single Byte character 16Kanji numbering 3 (*dbnum3). 17Kanji numbering 4 (*dbnum4). 18Circle numbering (*circlenum). 19Double-byte Arabic numbering 2046 phonetic double-byte Katakana characters (*aiueo*dbchar). 2146 phonetic double-byte katakana characters (*iroha*dbchar). 22Arabic with leading zero (01, 02, 03, ..., 10, 11) 23Bullet (no number at all) 24Korean numbering 2 (*ganada). 25Korean numbering 1 (*chosung). 26Chinese numbering 1 (*gb1). 27Chinese numbering 2 (*gb2). 28Chinese numbering 3 (*gb3). 29Chinese numbering 4 (*gb4). 30Chinese Zodiac numbering 1 (* zodiac1) 31Chinese Zodiac numbering 2 (* zodiac2) 32Chinese Zodiac numbering 3 (* zodiac3) 33Taiwanese double-byte numbering 1 34Taiwanese double-byte numbering 2 35Taiwanese double-byte numbering 3 36Taiwanese double-byte numbering 4 37Chinese double-byte numbering 1 38Chinese double-byte numbering 2 39Chinese double-byte numbering 3 40Chinese double-byte numbering 4 41Korean double-byte numbering 1 42Korean double-byte numbering 2 43Korean double-byte numbering 3 44Korean double-byte numbering 4 45Hebrew non-standard decimal 46Arabic Alif Ba Tah 47Hebrew Biblical standard 48Arabic Abjad style 255No number |
\leveljcN | 0Left justified
1Center justified 2Right justified |
\levelnfcnN | Same arguments as \levelnfc. Takes priority over it if both are present. In Word 97 \levelnfc was interpreted differently by the Hebrew/Arabic versions. \levelnfcn in Word 2000 eliminates dual interpretation while \levelnfc is still needed for backwards compatibility. |
\leveljcnN | 0Left justified if for left-to-right paragraphs and right justified for right-to-left paragraphs
1Center justified 2Right justified if for left-to-right paragraphs and left justified for right-to-left paragraphs Word 2000 prefers it over \leveljc if both are present, but it will be written for backwards compatibility with older readers. |
\leveloldN | 1 if this level was converted from Word 6.0 or 7.0, 0 if it is a native Word 97-2000 level. |
\levelprevN | 1 if this level includes the text from the previous level (used for Word 7.0 compatibility only); otherwise, the value is 0 . This keyword will only be valid if the \leveloldN keyword is emitted. |
\levelprevspaceN | 1 if this level includes the indentation from the previous level (used for Word 7.0 compatibility only); otherwise, the value is 0. This keyword will only be valid if the \leveloldN keyword is emitted. |
\levelindentN | Minimum distance from the left indent to the start of the paragraph text (used for Word 7.0 compatibility only). This keyword will only be valid if the \leveloldN keyword is emitted. |
\levelspaceN | Minimum distance from the right edge of the number to the start of the paragraph text (used for Word 7.0 compatibility only). This keyword will only be valid if the \leveloldN keyword is emitted. |
\leveltext | If the list is hybrid, as indicated by \listhybrid we will find the \leveltemplateidN keyword, whose argument is a unique level ID that should be randomly generated. The value N is a long integer. The level ID cannot be between -1 and -5.
The second argument for this destination should be the number format string for this level. The first character is the length of the string, and any numbers within the level should be replaced by the index of the level they represent. For example, a level three number such as "1.1.1." would generate the following RTF: "{\leveltext \leveltemplateidN \'06\'00.\'01.\'02.}" where the '06 is the string length, the \'00, \'01, and \'02 are the level place holders, and the periods are the surrounding text. This is a destination control word. |
\levelnumbers | The argument for this destination should be a string that gives the offsets into the \leveltext of the level place holders. In the above example, "1.1.1.", the \levelnumbers RTF should be
because the level place holders have indices 1, 3, and 5. This is a destination control word. |
\levelfollowN | Specifies which character follows the level text:
0Tab 1Space 2Nothing |
\levellegalN | 1 if any list numbers from previous levels should be converted to Arabic numbers; 0 if they should be left with the format specified by their own level's definition. |
\levelnorestartN | 1 if this level does not restart its count each time a number of a higher level is reached, 0 if this level does restart its count each time a number of a higher level is reached. |
In addition to all of these properties, each list level can contain any character properties (all of which affect all text for that level) and any combination of three paragraph properties: left indents, first line left indents, and tabs—each of which must be of a special type: jclisttab. These paragraph properties will be automatically applied to any paragraph in the list.
The List Override table is a list of list overrides (destination \listoverride). Each list override contains the listid of one of the lists in the List table, as well as a list of any properties it chooses to override. Each paragraph will contain a list override index (keyword ls) which is a 1-based index into this table. Most list overrides don't override any properties—instead, they provide a level of indirection to a list. The two types of list overrides are, in general: (1) formatting overrides, which allow a paragraph to be part of a list, are numbered together with the other members of the list, but have different formatting properties; and (2) start-at overrides, which allow a paragraph to share the formatting properties of a list, but have a different start-at values. The first element in the document with each list override index takes the start-at value that the list override specifies as its value, while each subsequent element is assigned the number succeeding the previous element of the list.
List overrides have a few top-level keywords, including a \listoverridecount, which contains a count of the number of levels whose format is overridden. This \listoverridecount should always be either 1 or 9, depending upon whether the list to be overridden is simple or hybrid/multilevel. All of the actual override information is stored within a list of list override levels (destination \lfolevel).
Control Word |
Meaning |
\listidN | Should exactly match the \listid of one of the lists in the List table. The value N is a long integer. |
\listoverridecountN | Number of list override levels within this list override (1 or 9). |
\ls | The (1-based) index of this \listoverride in the \listoverride table. This value should never be zero inside a \listoverride, and must be unique for all \listoverrides within a document. The valid values are from 1 to 2000. |
Each list override level contains flags to specify whether the formatting or start-at values are being overridden for each level. If the format flag (listoverrideformat) is given, the lfolevel should also contain a list level (listlevel). If the start-at flag (listoverridestartat) is given, a start-at value must be provided. If the start-at is overridden but the format is not, then a levelstartat should be provided in the lfolevel itself. If both start-at and format are overridden, put the levelstartat inside the listlevel contained in the lfolevel.
Control Word |
Meaning |
\listoverridestartat | Indicates an override of the start-at value. |
\listoverrideformatN | Number of list override levels within this list override (should be either 1 or 9). |
This table allows tracking of multiple authors and reviewers of a document, and is used in conjunction with the character properties for tracking changes (using revision marks).
Control Word |
Definition |
\*\revtbl | This group consists of subgroups that each identify the author of a revision in the document, as in {Author1;}. This is a destination control word.
Revision conflicts, such as one author deleting another's additions, are stored as one group, in the following form:
The 4 bytes of the Date/Time (DTTM) structure are emitted as ASCII characters, so values greater than 127 should be emitted as hexadecimal values enclosed in quotation marks. |
All time references for revision marks use the following bit field structure, DTTM.
Bit numbers | Information | Range |
0–5 | Minute | 0–59 |
6–10 | Hour | 0–23 |
11–15 | Day of month | 1–31 |
16–19 | Month | 1–12 |
20–28 | Year | = Year—1900 |
29–31 | Day of week | 0 (Sun)–6 (Sat) |