Document Notes

Paul DuBois
dubois@primate.wisc.edu
9 July 1993

The document following this cover page describes the Microsoft RTF standard.  It was created by scanning in a paper copy of the original from Microsoft, running it through an OCR program, and then manually correcting any residual errors I was able to identify.  I did not write the RTF document; moreover, Microsoft is not responsible for any errors I failed to correct.

To print this file, make sure you’re using “Larger Print Area” if your printer driver allows it (try Page Setup).  Otherwise the page headers may be cut off.

Uncorrected Errors

In the process  of error correction I discovered a few errors in the original.  Since the original document says it may be distributed as long as all text is included without modification, I deliberately left them uncorrected.  These are listed below.

Page 3, example contains following, where “widoctrl” should be “widowctrl”:

	\nofwords0}{\nofchars0}{\vern8351}}\widoctrl\ftnbj \sectd

Page 5, says \fRoman (and so does the index entry); should be \froman.

Page 6, example contains “\ar”, which is not a legal RTF control word:
; I’m unsure what it ought to be:

	{\s1\ar \fs20 \sbasedon0\snext1 FLUSHRlGHT;}{\s2\fi-720\li720\fs20\ri2880

I’m unsure what this ought to be; perhaps \qr.

Page 8, description of \pichN has “The yExt” all in italics, but “The” should be roman.

Page 11, first example contains the following, where “wmbwidthbytes” should be “wbmwidthbytes”:

	{\pict\wbitmmap0\picw170\pich77\wbmbitspixel1\wbmplanes1\wmbwidthbytes22\picwgoal505

Page 11, second example comtains following, where “pu6” should be “up6”:

	\ri1170 \fs20 {\pu6 Mead's landmark study has been amply annotated.\chftn

Page 18, narrative uses \* in front of \bkmkstart and \bkmkend, but the example following leaves out the \*’s.

Page 21, the description for \margtsxn says “...is the right margin...”, should say “...is the top margin...”

Page 21, the description for \margbsxn says “...is the top margin...”, should say “...is the bottom margin...”

Page 30, contains this sentence: “Instead, it treats values from 57 through 63 as –7 through –1 , respectively (the low‑order 6 bits of 57 through 63 are the same as –7 through 1).”  The final “1” should be “–1”.

Other Errors

The following are what I believe are flaws in the standards document.

Page 5, states that the current version of the RTF standard is specified by \rtfN, and that the current version is 1.0.  Since N is an integer, what sense does it make for the current version to have a fractional part?

Page 31, remarks about CRLF apparently contradict remarks about CRLF on page 10.

Microsoft® MS‑DOS®, Windows™, 0S/2®,
and Apple® Macintosh® Applications			
Version:	RTF Version 1 .0	Product Support Services	
Subject:	Rich-Text Format (RTF) Specification	Application Note	
Contents:	34 Pages, No Disk	6/92 ‑ GC0165	

INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY ACCOMPANY THIS DOCUMENT (collectively referred to as an Application Note) IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. The user assumes the entire risk as to the accuracy and the use of this Application Note. This Application Note may be copied and distributed subject to the following conditions: 1) All text must be copied without modification and all pages must be included; 2) Itfsoftware is included, all files on the disk(s) must be copied without modification (the MS‑DOS utility diskcopy is appropriate for this purpose); 3) All components of this Application Note must be distributed together; and 4) This Application Note may not be distributed for profit.

Copyright© 1989‑1992 Microsoft Corporation. All Rights Reserved.
Microsoft and MS‑DOS are registered trademarks and Windows is a trademark of Microsoft Corporation.
OS/2 is a registered trademark licensed to Microsoft Corporation.
Apple, Macintosh, and TrueType are registered trademarks and QuickDraw is a trademark of Apple Computer, Inc.
IBM and Personal System/2 are registered trademarks of International Business Machines Corporation.
PostScript is a registered trademark of Adobe Systems, Inc.
Times Roman, Palatino, and Helvetica are registered trademarks of Linotype AG and/or its subsidiaries.
Swiss is a trademark of Bitstream, Inc.
ITC Zapf Chancery is a registered trademark of the International Typeface Corporation.
MathType is a trademark of Design Science, Inc.
This document was created using Microsoft Word for Windows.

Overview

The rich‑text format (RTF) standard is a method of encoding formatted text and graphics for easy transfer between MS‑DOS, Windows, OS/2, and Apple Macintosh applications.

The RTF standard provides a format for text and graphics interchange that can be used with different output devices, operating environments, and operating systems. RTF uses the ANSI, PC‑8, Macintosh, or IBM PC character set to control the representation and formatting of a document, both on the screen and in print. With the RTF standard, you can transfer documents created under different operating systems and with different software applications among those operating systems and applications.

Software that takes a formatted file and turns it into an RTF file is called a writer. An RTF writer separates the application's control information from the actual text and writes a new file containing the text and the RTF groups associated with that text. Software that translates an RTF file into a formatted file is called a reader.

RTF Syntax

An RTF file consists of unformatted text, control words, control symbols, and groups. For ease of transport, a standard RTF file can consist of only 7‑bit ASCII characters. However, Word for Windows uses 8‑bit characters in the RTF stream given to converter DLLs.

A control word is a specially formatted command that RTF uses to mark printer control codes and information that applications use to manage documents. A control word takes the following form:

\LetterSequence[NumericParameter]delimiter

For example:

       

A	A backslash begins each control word
B	Letter sequence
C	Numeric parameter

The letter sequence is made up of uppercase or lowercase alphabetic characters between A and Z inclusive.

The numeric parameter begins with a digit or a minus sign (–). The range of the values for the numeric parameter is –32,767 through 32,767. However, Microsoft Word for Windows, Word for OS/2, and Word for the Macintosh restrict the range to –31,680 through 31,680. If a numeric parameter immediately follows the control word, this parameter becomes part of the control word and the delimiter follows the parameter.

The delimiter marks the end of an RTF control word or symbol. A delimiter can be one of the following:

•	A space.  If a space delimits a control word, the space does not appear in the document.  Any characters following the delimiter, including spaces, do appear in the document. For this reason, you should use spaces only where necessary; do not use spaces merely to break up RTF code.

•	A backslash (\), opening brace ({), or closing brace (}).  These characters are used to mark the beginning of a new control word or symbol, the beginning of a group, and end of a group, respectively.  More information about control symbols and groups is provided later in this document.

•	Any character other than a letter or a digit.  In this case, the character terminates the control word but is not actually part of the control word.  The character is considered part of the document text.

Some control words govern properties that have only two states (for example, bold, which is either turned on or turned off).  When such a control word has no parameter or has a nonzero parameter, it is assumed that the control word turns on the property.  When such a control word has a parameter of 0 (zero), it is assumed that the control word turns off the property. For example, \b turns on bold, whereas \b0 turns off bold.

A control symbol consists of a backslash followed by a single, nonalphabetic character.  For example, \~ represents a nonbreaking space. Control symbols take no delimiters.

A group consists of text and control words or control symbols enclosed in braces ({ }). The opening brace indicates the start of the group and the closing brace indicates the end of the group. Each group specifies the text affected by the group and the different attributes of that text. The RTF file can also include groups for fonts, styles, screen color, pictures, footnotes, annotations, headers and footers, summary information, fields, and bookmarks, as well as document‑, section‑, paragraph‑, and character‑formatting properties. If the font, style, screen color, and summary information groups and document formatting properties are included, they must precede the first plain‑text character in the document. These groups form the RTF file header. If the group for fonts is included, it should precede the group for styles. If any group is not used, it can be omitted. The groups are discussed in the following sections.

Certain groups, referred to as destinations, mark the beginning of a collection of related text that could appear at another position, or destination, within the document.  Destinations can also be text that is used but should not appear within the document at all.  Destinations are sometimes distinguished from other groups by a \* control symbol immediately following the opening brace of the group.  The \* is followed by a control word that defines the type of the destination.  This control symbol identifies destinations whose related text should be ignored if the RTF reader does not recognize the destination.  (RTF writers should follow the convention of using this control symbol when adding new control words.)  Destinations whose related text should be inserted into the document even if the RTF reader does not recognize the destination should not use \*. An example of a destination is the \footnote group, where the footnote text follows the control word.

Formatting specified within a group affects only the text within that group. Generally, text within a group inherits the formatting of the text in the preceding group. However, Microsoft implementations of RTF assume that the footnote, header and footer, and annotation groups (described later in this document) do not inherit the formatting of the preceding text. Therefore, to ensure that these groups are always formatted correctly, you should set the formatting within these groups to the default with the \sectd, \pard, and \plain control words, and then add any desired formatting.

The control words, control symbols, and braces constitute control information. All other characters in the file are plain text. The following is an example of plain text that does not exist within a group:

{\rtf\ansi\deff0\fonttbl{\f0\froman Tms Rmn;}{\f1\fdecor Symbol;}{\f2\fswiss
Helv;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\b1ue255;
\red0green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
\red255\green255\blue0;\red255\green255\blue255;}{\sty1esheet{\fs20 \snext0
Normal;}}{\info{\author John Doe}
{\creatim\yr1990\mo7\dy30\hr10\min48}{\version1}{\edmins0}{\nofpages1}{
\nofwords0}{\nofchars0}{\vern8351}}\widoctrl\ftnbj \sectd
\linex0\endnhere \pard\plain \fs20 This is plain text.
\par}

The phrase, “This is plain text” in the second‑to‑last line is not part of a group and is treated as document text.

As previously mentioned, the backslash (\) and braces ({ }) have special meaning in RTF.  To use these characters as text, precede them with a backslash, as follows:

	\\
	\{
	\}

Conventions of an RTF Reader

The reader of an RTF stream is concerned with the following:

•	Separating control information from plain text
•	Acting on control information
•	Collecting and properly inserting text into the document, as directed by the state of the current group

The process of acting on control information is designed to be relatively simple. Some control information only contributes special characters to the plain text stream. Other information changes the program state, which includes properties of the document as a whole, or changes a collection of group states, which applies to parts of the document.

As previously mentioned, a group state can specify the following:

•	The destination, or part of the document that the plain text is constructing
•	Character formatting properties, such as bold or italic
•	Paragraph formatting properties, such as justified or centered
•	Section formatting properties, such as the number of columns
•	Table formatting properties, which define the number of cells and dimensions of a table row

An RTF reader performs the following procedure:

1.	The reader reads the next character.

2.	If the next character is:

•	An opening brace, the reader stores the current state of the document on the stack.

•	A closing brace, the reader retrieves the current state of the document from the stack.

•	A backslash, the reader marks the beginning of an RTF control. The reader collects the control word or control symbol and its parameter, if any, and carries out the action prescribed for that control. The meaning of each of the controls is discussed in the section, “Contents of an RTF File,” on page 4 of this document. The read pointer is left on the next nonspace delimiter following the control.

•	Anything other than an opening brace, closing brace, or backslash, the reader assumes that the character is plain text and writes the character to the current destination using the current formatting properties.

3.	The reader then reads the next character.

If the RTF reader does not recognize a particular control word or control symbol, the reader ignores it. When the reader encounters a control word or control symbol preceded by an opening brace, the reader recognizes the control as part of a group. The reader saves the current state on the stack but does not change the state. When the reader encounters a closing brace, the reader retrieves the current state from the stack, thereby resetting the current state. If the \* control symbol precedes the unknown control word, \* defines a destination group and is preceded by an opening brace. The RTF reader will discard all text and subgroups up to and including the brace that closes this group.

For control words or control symbols recognized by the RTF reader, the possible actions are as follows:

Action	Description	
Change destination	The RTF reader changes the destination to the destination described in the table entry. Destination changes are legal only immediately after an opening brace. (Other restrictions may also apply; for example, footnotes cannot be nested.) Many destination changes imply that the current property settings will be reset to their default settings. Examples of control words that change the destination are \footnote, \header, \footer, \pict, \info, \fonttbl, \stylesheet, and \colortbl.
	
Change formatting property	The RTF reader changes the property as described in the table entry. The entry specifies whether a parameter is required.
	
Insert special character	The reader inserts into the document the character code or codes described in the table entry.
	
Insert special character and perform action	The reader inserts into the document the character code or codes described in the table entry and performs whatever other action the entry specifies. For example, when Microsoft Word interprets \par, Word inserts a paragraph mark in the document, along with the paragraph properties belonging to that paragraph mark.

Contents of an RTF File

An RTF file can contain combinations of the following elements:

The RTF Version

An entire RTF file is considered a group and must be enclosed in braces. The control word \rtfN must follow the opening brace. The numeric parameter N identifies the version of the RTF standard used. The RTF standard described in this document is version 1.0.

The Character Set

After specifying the RTF version, you must declare the character set. 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.0 of Microsoft Word for OS/2)	

The Font Table

This group begins with the control word \fonttbl and contains descriptions of fonts. All fonts available to the RTF writer can be included in the font table, even if the document doesn’t use all the fonts.
A font is defined by a font number, a font family, and a font name as shown in the following example:

A	Control word	C	Font family

B	Font number	D	Font name

Semicolons separate one font from the next. The font numbers represent the full font definitions in the group and vary with each document. The font families are listed below:

Control Word	Font Family	
\fnil	Unknown or default fonts (the default)	
\fRoman	Roman, proportionally spaced serif fonts (for example, Times Roman® and Palatino®)	
\fswiss	Swiss™, proportionally spaced sans serif fonts (for example, Swiss Helvetica®)	
\fmodern	Fixed‑pitch serif and sans serif fonts (for example, Courier and Pica)	
\fscript	Script fonts (for example, Cursive)	
\fdecor	Decorative fonts (for example, Old English and ITC Zapf Chancery®)	
\ftech	Technical, symbol, and mathematical fonts (for example, Symbol)	

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 Style Sheet

The style sheet group begins with the control word \stylesheet. This group contains definitions and descriptions of the various styles used in the document. The style sheet is declared only once, before any document text. All styles in the document's style sheet can be included, even if not all the styles are used.

Control Word	Meaning	
\sbasedonN	Defines the number of the style on which the current style is based. Word for Windows defaults to the Normal style—style number 222—if \sbasedon is omitted.	
\snextN	For paragraph styles, \snext defines the style automatically assigned to a paragraph created following the paragraph with the current style. If \snext omitted, the next paragraph is given the same style as the current paragraph.	
\keycode	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 Normal style may be defined {\s0 {\*\keycode \shift\ctrl n}Normal;} within the RTF style sheet. See the “Special Characters” control words, on page 30 of this document, for the characters outside of the alphanumeric range that can be used.	

An example of an RTF style sheet and styles follows:
	. . .	
	{\stylesheet{\fs20 \sbasedon222\snext0{\*\keycode \shift\ctrl n} Normal;}
{\s1\ar \fs20 \sbasedon0\snext1 FLUSHRlGHT;}{\s2\fi-720\li720\fs20\ri2880
\sbasedon0\snext2 IND;}}	
	 . . .	
	\widowctrl\ftnbj\ftnrestart \sectd \linex0\endnhere
\pard\plain \fs20 This is Norrnal style.
\par \pard\plain \s1
This is right justified. I call this style FLUSHRIGHT.
\par \pard\plain \s2
This is an indented paragraph. I call this style IND. It produces a hanging indent.	
		
	\par}	
	. . .	
A	Style sheet
B	Styles applied to text

This is Normal style.
	This is right justified. I call this style FLUSHRIGHT.
This is an indented paragraph. I call this style lND.
	It produces a hanging indent.

In this example, PostScript® is declared but not used. Some of the control words in this example are discussed in the following sections.

The Color Table

Screen colors, character colors, and other color information are contained in the color table group. The control word \colortbl begins this group. Additional control words for red, green, and blue and the foreground and background colors then use parameter values (0–255) corresponding to the color indexes used by Microsoft Windows to define the amount of red, green, and blue that makes up a color. For more information on color setup, see your Windows documentation.

The following are valid control words for this group:

Control Word	Meaning	
\redN	Red index	
\greenN	Green index	
\blueN	Blue index	
\cfN	Foreground color (the default is 0)	
\cbN	Background color (the default is 0)	

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. In the example that follows, three colors are defined. The first color is omitted, as shown by the semicolon following the \colortbl control word.

. . .
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;}
. . .

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.

Pictures

An RTF file can include picture files created with other applications. These files are in hexadecimal (the default) or binary format. The control word \pict begins this group. Control words that define and describe the picture parameters follow the \pict control word. These control words are listed in the following table (some measurements in this table are in twips; a twip is one‑twentieth of a point):

General

Control Word	Meaning	
\macpict	The source file of the picture is QuickDraw™.	
\pmmetafileN	The source file of the picture is an OS/2 metafile; the N argument identifies the metafile type.	
\wmetafileN	The source file of the picture is a Windows metafile; the N argument identifies the metafile type (the default is 1, meaning the metafile type is MM_TEXT).	
\dibitmapN	The source file of the picture is a device independent bitmap; the N argument identifies the bitmap type (the default is 0).	
\wbitmapN	The source file of the picture is a bitmap; the N argument identifies the bitmap type (the default is 0, meaning that the bitmap is a logical bitmap).	

Bitmap Information

Control Word	Meaning	
\wbmbitspixelN	The number of bitmap bits per pixel (the default is 1).	
\wbmplanesN	The number of bitmap planes (the default is 1).	
\wbmwidthbytesN	The bitmap width in bytes.	

Picture Size, Scaling and Cropping

Control Word	Meaning	
\picwN	xExt field if the picture is a metafile; the picture width in pixels if the picture is a bitmap or is from QuickDraw.	
\pichN	The yExt field if the picture is a metafile; the picture height in pixels if the picture is a bitmap or from QuickDraw.	
\picwgoalN	The desired width of the picture in twips.	
\pichgoalN	The desired height of the picture In twips.	
\picscalexN	The horizontal scaling value; the N  argument is a value representing a percentage (the default is 100).	
\picscaleyN	The vertical scaling value; the N argument is a value representing a percentage (the default is 100).	
\picscaled	Scales the picture to fit within the specified frame; used only with \macpict pictures.	
\piccroptN	The top cropping value in twips; a positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around the picture (the default is 0).	
\piccropbN	The bottom cropping value in twips; a positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around the picture (the default is 0).	
\piccroplN	The left cropping value in twips; a positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around the picture (the default is 0).	
\piccroprN	The right cropping value in twips; a positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around the picture (the default is 0).	

Picture Border

Control Word	Meaning	
\brdrs	A single picture border.	
\brdrdb	A double picture border.	
\brdrth	A thick picture border.	
\brdrsh	A shadow picture border.	
\brdrdot	A dotted picture border.	
\brdrhair	A hairline picture border.	
\brdrwN	N is the width in twips of the picture border line. This control should follow the picture border controls \brdrt, \brdrr, \brdrb, and \brdrl.	
\brdrcfN	N is the color of the picture border from the color table in the RTF header. This control should follow the picture border controls \brdrt, \brdrr, \brdrb, and \brdrl.	

Picture Background Shading

Control Word	Meaning	
\shadingN	N is the shading of the picture in hundredths of a percent.	
\bghoriz	Specifies a horizontal background pattern for the picture.	
\bgvert	Specifies a vertical background pattern for the picture.	
\bgfdiag	Specifies a forward diagonal background pattern for the picture (\\\\).	
\bgbdiag	Specifies a backward diagonal background pattern for the picture (////).	
\bgcross	Specifies a cross‑hatched background pattern for the picture.	
\bgdcross	Specifies a diagonal cross‑hatched background pattern for the picture.	
\bgdkhoriz	Specifies a dark horizontal background pattern for the picture.	
\bgdkvert	Specifies a dark vertical background pattern for the picture.	
\bgdkfdiag	Specifies a dark forward diagonal background pattern for the picture (\\\\).	
\bgdkbdiag	Specifies a dark backward diagonal background pattern for the picture (////).	
\bgdkcross	Specifies a dark cross‑hatched background pattern for the picture.	
\bgdkdcross	Specifies a dark diagonal cross‑hatched background pattern for the picture.	
\cfpatN	N is the line color of the background pattern.	
\cbpatN	N is the background color of the background pattern.	

Picture Data

Control Word	Meaning	
\binN	The picture is in binary format; the numeric parameter N is the number of bytes that follow.	

The \wbitmap control word is optional; if neither \wmetafile nor \macpict is specified, the picture is assumed to be a Windows bitmap. If \wmetafile is specified, the N argument can be one of the following types:

Type	N Argument	
MM_TEXT	1	
MM_LOMETRIC	2	
MM_HIMETRIC	3	
MM_LOENGLISH	4	
MM_HIENGLISH	5	
MM_TWIPS	6	
MM_ISOTROPIC	7	
MM_ANISOTROPIC	8	

If \pmmetafile is specified, the N argument can be one of the following types:

Type	N Argument	
PU_ARBITRARY	4	
PU_PELS	8	
PU_LOMETRIC	12	
PU_HIMETRIC	16	
PU_LOENGLISH	20	
PU_HIENGLISH	24	
PU_TWIPS	28	

Be careful with spaces following control words when dealing with pictures in binary format. When reading files, RTF considers the first space after a control word the delimiter and subsequent spaces part of the document text. Therefore, any extra spaces are attached to the picture, with unpredictable results.

RTF writers should not use the carriage‑return/linefeed (CRLF) combination to break up pictures in binary format. If they do, the CRLF is treated as literal text and considered part of the picture data.

The picture in hexadecimal or binary format follows the picture‑group control words. The following example illustrates the group format:

	{\pict\wbitmap0\picw170\pich77\wbmbitspixel1\wbmplanes1\wmbwidthbytes22\picwgoal505	
	\pichgoal221
\picscalex172
\picscaley172
3901000a000000000273023d98
0048000200000275
02040000200010275023e000000000
273023d000002b90002b90002
b90002b90002b9
0002b90002b90002b90002b90002b90002
b92222b90002b90002b90
002b90002b9
0002b90002b90002b90002b9000
. . .	
A	Source	D	Bits per pixel	G	Desired picture width	J	Vertical scaling value	
								
B 	Width	E	Bitmap planes	H	Desired picture height	K	Hexadecimal data	
								
C 	Height	F	Width of picture in bytes	I	Horizontal scaling value			

Note: The controls \pichgoal, \picscalex, and \picscaley in this example are on separate lines for the purpose of illustration only. In actual RTF code, they can be included on the same line.

Footnotes

The group containing footnote text begins with the control word \*\footnote. Footnotes are anchored to the character that immediately precedes the footnote group. If automatic footnoting is defined, the group can be preceded by a footnote reference character, identified by the control word \chftn.

The following is an example of a group containing footnotes:
	. . .
\ftnbj\ftnrestart \sectd \linemod0\linex0\endnhere \pard\plain
\ri1170 \fs20 {\pu6 Mead's landmark study has been amply annotated.\chftn
{\*\footnote \pard\plain \s246 \fs20 {\up6\chftn }See Sahlins, Bateson, and
Geertz for a complete bibliography.}
It was her work in America during the Second World War, however, that forms
the basis for the paper. As others have noted, \chftn
{\*\footnote \pard\plain \s246 \fs20 {\up6\chftn}
A complete bibliography will be found at the end of the chapter.}
this period was a turning point for Margaret Mead.}
\par
. . .	
Mead's landmark study has been amply annotated. 1 It was her work in America
during the Second World War, however, that forms the basis for this paper. As
others have noted,2 this period was a turning point for Margaret Mead.

1 See Sahlins , Bateson, and Geertz for a complete bibliography.
2 A complete bibliography will be found at the end of the chapter.

A	Footnotes

For other control words relating to footnotes, see the sections titled “Document Formatting Properties” (page 18), “Section Formatting Properties,” (page 20), and “Special Characters” (page 30), later in this document.

Annotations

The group containing annotation text begins with the control word \*\annotation. Annotations are anchored to the character that immediately precedes the annotation group. The group must be preceded by an annotation reference character identified by the control word \chatn. The annotation reference character must in turn be preceded by a group that begins with the control word \*\atnid and that contains the identification text for the author of the annotation. An example of annotation text follows:

. . .
An example of a paradigm might be Newtonian physics or
Darwinian biology.{\v\fs16 {\atnid bz}\chatn{\*\annotation
\pard\plain \s224 \fs20 {\field{\fldinst page \\#'"Page:
'#'\line'"}{\fldrslt}}{\fs16 \chatn }
How about some examples that deal with social science?
That’s what this paper is about.}}
. . .

Headers and Footers

Headers and footers are treated as separate groups in RTF. Different headers and footers can be defined for different sections in the document. If none is defined for a given section, the headers and footers from the previous section (if any) are used. These groups must precede the first plain‑text character in the document section to which they apply.

The control words \header and \footer begin these groups. These control words can be replaced by the following control words, as appropriate:

Control Word	Meaning	
\headerl	The header is on left pages only.	
\headerr	The header is on right pages only.	
\headerf	The header is on the first page only.	
\footerl	The footer is on left pages only.	
\footerr	The footer is on right pages only.	
\footerf	The footer is on the first page only.	

The \headerl and \headerr and \footerl and \footerr control words are used in conjunction with the \facingp control word, and the \headerf and \footerf control words are used in conjunction with the \titlepg control word. For more information, see “Document Formatting Properties” (page 18), and “Section‑Formatting Properties” (page 20) in this document.

Summary Information

The RTF file can also contain a summary information group, which is translated but not displayed with the text. This information can include the title, author, keywords, comments, and other information specific to the file. This information is for use by a document‑management utility, if available.

This group begins with the control word \info. Some applications, such as Word, ask the user to type this information when saving the document in its native format. If the document is then saved as an RTF file or translated into RTF, the RTF writer specifies this information using the following control words. These control words are destinations, and both the control words and the text should be enclosed within braces ({ }).

Control Word	Meaning	
\title	The title of the document	
\subject	The subject of the document	
\author	The author of the document	
\operator	The person who last made changes to the document	
\keywords	Selected keywords for the document	
\comment	Comments; text is ignored	
\versionN	The version number of the document	
\doccomm	Comments displayed in Word’s Summary Info dialog box	

The RTF writer can automatically enter other control words, including the following:

Control Word	Meaning	
\vernN	The internal version number	
\creatim	The creation time	
\revtim	The revision time	
\printim	The last print time	
\buptim	The backup time	
\edminsN	The total editing time (in minutes)	
\yrN	The year	
\moN	The month	
\dyN	The day	
\hrN	The hour	
\minN	The minute	
\nofpagesN	The number of pages	
\nofwordsN	The number of words	
\nofcharsN	The number of characters	
\idN	The internal ID number	

Entries without the N parameter have the \yr \mo \dy \hr \min format. An example of a summary information group follows:

. . .
{\info{\title The Panda’s Thumb}{\author Stephen J. Gould}{\keywords
science natural history }}

Fields

The field group contains the text of Word fields. For more detailed information on fields, choose Help in Microsoft Word for Windows.

The field group begins with the control word \field. The following control words can follow the \field control word:

Control Word	Meaning	
\flddirty	A formatting change has been made to the field result since the field was last updated.	
\fldedit	 The text has been added to, or removed from, the field result since the field was last updated.	
\fldlock	A field is locked and cannot be updated.	
\fldpriv	A result is not in a form suitable for display (for example, binary data used by fields whose result is a picture).	

Two subgroups are available within the \field group. They must be enclosed within braces ({ }) and begin with the following control words:

Control Word	Meaning	
\*\fldinst	Field instructions	
\fldrslt	The most recently calculated result of the field	

The \fldrslt control word should be included even if no result has been calculated because even readers that do not recognize fields can generally include the value of the \fldrslt group in the document.

An example of field text follows:

{\field\fldedit{\fldinst author}{\fldrslt Joe Smith}}\par\pard
{\field{\fldinst time \\@ "h:mm AM/PM"}{\fldrslt 8:12 AM}}

A	Begins field group

B	Field instructions

C	Field result

Index Entries

The index entry group begins with the control word \xe. Following this control word is the text of the index entry and other optional control words that further define the index entry.

If the text of the index entry is not formatted as hidden text with the \v control word, the text is put into the document as well as into the index. For more information on the \v control word, see “Character Formatting Properties” on page 28 of this document. Similarly, the text of the \txe subgroup, described later in this section, becomes part of the document if it is not formatted as hidden text.

The following control words can also be used:

Control Word	Meaning	
\bxe	Formats the page number or cross-reference in bold	
\ixe	Formats the page number or cross-reference in italic	

The following control words are destinations within the \xe group and are followed by text arguments. These control words and their arguments must be enclosed within braces ({ })

Control Word	Meaning	
\txe Text	The text argument is to be used instead of a page number.	
\rxe BookmarkName 	The text argument is a bookmark for the range of page numbers.	

An example of an index entry follows:

{\xe (\v Index Entry}{\rxe IndexRange}{\txe See Index}\bxe \ixe }

A	Begins index entry group	D	Replacement for page number	
				
B 	Entry text	E	Bold entry in index table	
				
C 	Bookmark defining range of pages	F	Italic entry in index table	

Table of Contents Entries

The table of contents entry group begins with the control word \tc. It is followed by the text of the table of contents entry and other optional control words that further define the group.

As with index entries, text that is not formatted as hidden with the \v character‑formatting control word is put into the document. The following control words can also be used in this group:

Control Word	Meaning	
\tcfN	The type of table being compiled; N is mapped by existing Microsoft software to a letter between A and Z (the default is 67, which maps to C and is used for tables of contents).	
\tclN	The level number (the default is 1).	

Objects

Objects are structures in a document that contain a data portion and a result portion. The data portion generally appears hidden to the application that produced the document. A separate application uses the data and supplies the result or appearance of the data. This appearance is the result portion of the object. Some examples of objects include object linking and embedding (OLE) objects and Edition Manager Subscriber objects on the Macintosh platform.

In RTF, the results of objects are represented so that RTF readers that don’t understand objects or don’t use a particular type of object are able to use the current result in place of the object. This allows the appearance of the object to be maintained through the conversion even though the object functionality is lost. For this reason, it is important for RTF writers to supply the object result. The format of the result should be standard RTF.

The data portion of an OLE object is the structure produced from the OLE SaveToStream function. Some OLE clients rely on the OLE system to render the object, and a copy of the result is not available to the RTF writer for that application. For these cases, the object result can be obtained from the structure produced from the OLE SaveToStream function.

An object group is defined by the control word \object. These objects can be either embedded objects, OLE links, or subscriber objects on the Macintosh platform. If the RTF reader’s application does not use the type of object represented, then all the object information and data should be ignored and the object result should be inserted into the document in place of the object.

Each object comes with optional information about the object, a required data group that contains the object data, and an optional result that contains the last display of the object. This result contains standard RTF. It is the responsibility of the RTF writer to provide the result so that existing RTF readers will be able to display the object without having full object support.

The syntax for this group is as follows:

{\object [\objemb|\objlink|\objautlink|\objsub|\objpub|\objicemb] [\linkself] [\objlock] [{\*\objclass Name}] [{\*\objname Name}]] [\rsltmerge] [\rsltrtf|\rslttxt|\rsltpict|\rsltbmp] [\objsetsize] [\objalignN] [\objtransyN] [\objhN\objwN] [\objcroptN][\objcropbN][\objcroplN][\objcroprN] [\objscalexN[\objscaleyN] {\*\objdata[{\*\objalias[\binN] Data} {\*\objsect[\binN] Data}] [\binN] Data}Result}

See the \result control word in the following table for a description of Result:

Object Type

Control Word	Meaning	
\objemb	An object type of OLE embedded object. If no type is given for the object, the object is assumed to be of type \objemb.	
\objlink	An object type of OLE link.	
\objautlink	An object type of OLE autolink.	
\objsub	An object type of Macintosh Edition Manager subscriber.	
\objicemb	An object type of MS Word for Macintosh Installable Command (IC) Embedder.	

Object Information

Control Word	Meaning	
\linkself	The object is a link to another part of the same document.	
\objlock	Locks the object from any updates.	
\objclass	The syntax for the group is {\*\objclass Name} where Name is the name of the object class. This is optional in the \object group.	
\objname	The syntax for group is {\*\objname Name} where Name is the name of the specific object instance. This is optional in the \object group.	

Object Size, Position, Cropping, and Scaling

Control Word	Meaning	
\objhN	N is the original object height in twips.	
\objwN	N is the original object width in twips.	
\objsetsize	Forces the object server to set the object’s dimensions to those specified by the client.	
\objtransyN	N is the distance in twips an object should be moved vertically with respect to the baseline. This control word is needed to place MathType™ equation objects correctly in line. This is an optional control of the \object group.	
\objcroptN	N is the top cropping distance in twips.	
\objcropbN	N is the bottom cropping distance in twips.	
\objcroplN	N is the left cropping distance in twips.	
\objcroprN	N is the right cropping distance in twips.	
\objscalexN	N is the horizontal scaling percentage.	
\objscaleyN	N is the vertical scaling percentage.	

Object Data

Control Word	Meaning	
\objdata	The \objdata subgroup is required to be in the \object group. The syntax for this group is {\*\objdata[{\*\objalias[\binN] Data}{\*\objsect[\binN] Data}][\binN] ObjectData} where ObjectData represents the complete data of the object. If the \binN option is used, then N represents the number of bytes of binary data. Otherwise, the ObjectData is in hexadecimal.	
\objalias	This group contains the Alias Record for the publisher object for the Macintosh Edition Manager. If the \bin control is used, the data is in binary numerical format. Otherwise, it is represented in the RTF stream in hexadecimal.	
\objsect	This group contains the Section Record for the publisher object for the Macintosh Edition Manager. If the \bin control is used, the data is in binary numerical format. Otherwise, it is represented in the RTF stream in hexadecimal.	

Object Result

Control Word	Meaning	
\rsltrtf	Forces the result to be RTF, if possible.	
\rsltpict	Forces the result to be a Windows metafile or MacPict image, if possible.	
\rsltbmp	Forces the result to be a bitmap, if possible.	
\rslttxt	Forces the result to be plain text, if possible.	
\rsltmerge	Uses the formatting of the current result whenever a new result is obtained.	
\result	The result group is optional in the \object group. It contains the last update of the result of the object. The data of the result group should be standard RTF so that RTF readers that don’t understand objects or the type of object represented can use the current result in the object’s place to maintain the object's appearance. The syntax for this group is {\result ResultData} where ResultData is standard RTF syntax.	

Bookmarks

This group contains two control words: \*\bkmkstart, which indicates the start of the specified bookmark, and \*\bkmkend, which indicates the end of the specified bookmark. A bookmark is shown in the following example:

. . .
\pard\plain \fs20 Kuhn believes that science, rather than
discovering in experience certain structured
relationships, actually creates (or already participates in)
a presupposed structure to which it fits the data
{\bkmkstart paradigm} Kuhn calls such a presupposed
structure a paradigm.{\bkmkend paradigm}
. . .

If a bookmark covers a partial selection of columns of a table, \bkmkcolfN is used to denote the first column of a table covered by a bookmark and \bkmkcollN is used to denote the last column. If \bkmkcolf is not included, the first column of the table is used as the first column for the bookmark. If \bkmkcoll is not included, the last column of the table is used for the bookmark. These controls are used within the \*\bkmkstart group following the \bkmkstart control. For example, {\*\bkmkstart\bkmkcolf2\bkmkcoll5 Table1} places the bookmark “Table1” on columns 2 through 5 of a table.

Macintosh Edition Manager Publisher Objects

These controls define the RTF controls used to define publisher objects for the Macintosh Edition Manager. The range of publisher objects are marked as bookmarks; therefore, these controls are all used within the \bkmkstart group. The RTF syntax for a publisher object is:

{\*\bkmkstart\bkmkpub[\pubauto]{\*\objalias[\bin] Data}{\*\objsect[\bin] Data} BookmarkName}

Control Word	Meaning	
\bkmkpub	The bookmark marks a Macintosh Edition Manager publisher object.	
\pubauto	The publisher object will automatically update all Macintosh Edition Manager subscribers of this object whenever it is edited.	
\objalias	This group contains the Alias Record for the publisher object for the Macintosh Edition Manager. If the \bin control is used, the data is in binary format. Otherwise, it is in hexadecimal.	
\objsect	This group contains the Section Record for the publisher object for the Macintosh Edition Manager. If the \bin control is used, the data is in binary format. Otherwise, it is in hexadecimal.	

Document Formatting Properties

This section specifies the attributes of the document, such as margins and footnote placement. These attributes must precede the first plain‑text character in the document.

The control words that specify document formatting are listed in the following table (the measurements are in twips) .

The default values are used for omitted control words.

Control Word	Meaning	
\deftabN	The default tab width (the default is 720).	
\hyphhotz	The hyphenation hot zone (the amount of space at the right margin in which words are hyphenated—the default for Word is 360 twips).	
\linestartN	The beginning line number (the default is 1).	
\fracwidth	Uses fractional character widths when printing (QuickDraw only).	
\*\nextfile	The destination; the argument is the name of the file to print or index next; must be enclosed with braces.	
\*\template	The destination; the argument is the name of a related template file; must be enclosed with braces.	
\makebackup	The backup copy is made automatically when the document is saved.	
\defformat	Tells the RTF reader that the document should be saved in RTF format.	
\psover	Prints PostScript over the text.	
\deflangN	Defines the default language used in the document when character formatting is reset with the \plain control word. See “Character Formatting Properties” on page 28 of this document for a list of possible values for N.	

Footnotes

Control Word	Meaning	
\ftnsep	The text argument separates footnotes from the document.	
\ftnsepc	The text argument separates continued footnotes from the document.	
\ftncn	The text argument is a notice for continued footnotes.	
\endnotes	Print the footnotes at the end of the section (the default).	
\enddoc	Print the footnotes at the end of the document.	
\ftntj	Print the footnotes beneath text.	
\ftnbj	Print the footnotes at the bottom of the page.	
\ftnstartN	The beginning footnote number (the default is 1).	
\ftnrestart	The footnote numbers restart at each section.	

Page Information

Control Word	Meaning	
\paperwN	The paper width (the default is 12,240).	
\paperhN	The paper height (the default is 15,840).	
\marglN	The left margin (the default is 1,800).	
\margrN	The right margin (the default is 1,800).	
\margtN	The top margin (the default is 1,440).	
\margbN	The bottom margin (the default is 1,440).	
\facingp	Facing pages (activates odd/even headers and gutters).	
\gutterN	The gutter width (the default is 0).	
\margmirror	Switches margin definitions on left and right pages.	
\landscape	Landscape format.	
\pgnstartN	The beginning page number (the default is 1).	
\widowctrl	Widow control.	

Revision Marks

Control Word	Meaning	
\revisions	Turns on revision marking.	
\revpropN	Argument indicates how revised text will be displayed: 0 for no properties shown; 1 for bold; 2 for italic; 3 for underline (the default); 4 for double underline.	
\revbarN	Vertical lines mark altered text, based on the argument: 0 for no marking; 1 for left margin; 2 for right margin; 3 for outside (left on left pages, right on right pages; the default) .	

Section Formatting Properties

This group specifies section formatting properties, which apply to the text following the control word, with the exception of the section break control words (those beginning with \sbk). Section break control words describe the break preceding the text.

Section Formatting Control Words

Control Word	Meaning	
\sectd	Reset to the default section properties.	
\endnhere	Endnotes included in the section.	
\binfsxnN	N is the printer bin used for the first page of the section. If this control is not defined, the first page uses the same printer bin as defined by the \binsxnN control.	
\binsxnN	N is the printer bin used for the pages of the section.	

Section Break

Control Word	Meaning	
\sbknone	No section break.	
\sbkcol	The section break starts a new column.	
\sbkpage	The section break starts a new page (the default).	
\sbkeven	The section break starts at an even page.	
\sbkodd	The section break starts at an odd page.	

Columns

Control Word	Meaning	
\colsN	The number of columns for “snaking” (the default is 1).	
\colsxN	The space between columns in twips (the default is 720).	
\linebetcol	Insert a line between columns.	

Line Numbering

Control Word	Meaning	
\linemodN	The line number modulus amount to increase each line number (the default is 1).	
\linexN	The default value for N is 360 if \linex is omitted. A value of 0 for N means the automatic distance for the application reading the RTF file.	
\linestartsN	The beginning line number (the default is 1).	
\linerestart	The line numbers restart at the \linestarts value.	
\lineppage	The line numbers restart on each page.	
\linecont	The line numbers continue from the preceding section.	

Page Information

Control Word	Meaning	
\pgwsxnN	N is the page width in twips. A \sectd control resets the value to that specified by \paperwN in the document properties.	
\pghsxnN	N is the page height in twips. A \sectd control resets the value to that specified by \paperhN in the document properties.	
\marglsxnN	N is the left margin of the page in twips. A \sectd control resets the value to that specified by \marglN in the document properties.	
\margrsxnN	N is the right margin of the page in twips. A \sectd control resets the value to that specified by \margrN in the document properties.	
\margtsxnN	N is the right margin of the page in twips. A \sectd control resets the value to that specified by \margrN in the document properties.	
\margbsxnN	N is the top margin of the page in twips. A \sectd control resets the value to that specified by \margtN in the document properties.	
\guttersxnN	N is the width of the gutter margin for the section in twips. A \sectd control resets the value to that specified by \gutterN in the document properties. If facing pages is turned off, the gutter will be added to the left margin of all pages. If facing pages is turned on, the gutter will be added to the left side of odd-numbered pages and the right side of even-numbered pages.	
\Indscpsxn	Page orientation is in landscape format. To mix portrait and landscape sections within a document, the \landscape control should not be used so that the default for a section is portrait, which may be overridden by the \Indscpsxn control.	
\titlepg	The first page has a special format.	
\headeryN	The header is N twips from the top of the page (the default is 720).	
\footeryN	The footer is N twips from the bottom of the page (the default is 720).	

Page Numbers

Control Word	Meaning	
\pgnstartsN	The beginning page number (the default is 1).	
\pgncont	The continuous page numbering (the default).	
\pgnrestart	The page numbers restart at the \pgnstarts value.	
\pgnxN	The page number is N twips from the right margin (the default is 720).	
\pgnyN	The page number is N twips from the top margin (the default is 720).	
\pgndec	The page‑number format is decimal.	
\pgnucrm	The page‑number format is uppercase Roman numerals.	
\pgnlcrm	The page‑number format is lowercase Roman numerals.	
\pgnucltr	The page‑number format is uppercase letters.	
\pgnIcltr	The page‑number format is lowercase letters.	

Vertical Alignment

Control Word	Meaning	
\vertalt	The text is top aligned on the page (the default).	
\vertal	The text is bottom aligned on the page.	
\vertalc	The text is centered vertically on the page.	
\vertalj	The text is justified vertically on the page.	

Paragraph Formatting Properties

This group specifies paragraph formatting properties. To ensure compatibility with previous versions of RTF, if border properties are specified, the border segment control word (\brdrt, \brdrb, \brdrl, \brdrr, or \box) must precede the control word(s) that specify the pattern for the border.

Paragraph Formatting Control Words

Control Word	Meaning	
\pard	Resets to the default paragraph properties.	
\sN	Designates the reference number of the style in the RTF document; if a style is referenced within the document, style properties must be included along with the style reference in the document text.	
\intbl	The paragraph is part of a table.	
\keep	Keep the paragraph intact.	
\keepn	Keep the paragraph with the next paragraph.	
\noline	No line numbering.	
\pagebb	Break the page before the paragraph.	
\sbys	Side‑by‑side paragraphs.	

Alignment

Control Word	Meaning	
\ql	Left aligned (the default)	
\qr	Right aligned	
\qi	Justified	
\qc	Centered	

Indentation

Control Word	Meaning	
\fiN	First‑line indent (the default is 0).	
\liN	Left indent (the default is 0).	
\riN	Right indent (the default is 0).	

Spacing

Control Word	Meaning	
\sbN	Space before (the default is 0).	
\saN	Space after (the default is 0).	
\slN	Space between lines. If this control word is missing or if \s1000 is used, the line spacing is automatically determined by the tallest character in the line; if N is a positive value, this size is used only if it is taller than the tallest character (otherwise, the tallest character determines the size); if N is a negative value, the absolute value of N determines the size, even if it is shorter than the tallest character.	

Tabs

Control Word	Meaning	
\txN	The tab position in twips from the left margin.	
\tqr	A flush‑right tab.	
\tqc	A centered tab.	
\tqdec	A decimal tab.	
\tbN	A bar tab position in twips from the left margin.	
\tldot	Leader dots.	
\tlhyph	Leader hyphens.	
\tlul	A leader underline.	
\tlth	A leader thick line.	
\tleq	A leader equal sign.	

Paragraph Borders

Control Word	Meaning	
\brdrt	Border top.	
\brdrb	Border bottom.	
\brdrl	Border left.	
\brdrr	Border right.	
\brdrbtw	Consecutive paragraphs with identical border formatting are considered part of a single group with the border information applying to the entire group. To have borders around individual paragraphs within the group, the \brdrbtw control must be specified for that paragraph.	
\brdrbar	Box border outside (right side of odd‑numbered pages, left side of even‑numbered pages).	
\box	Border around the paragraph.	
\brdrs	Single‑thickness border.	
\brdrth	Thick border.	
\brdrsh	Shadowed border.	
\brdrdb	Double border.	
\brdrdot	Dotted border.	
\brdrhair	Hairline border.	
\brdrwN	N is the width in twips of the paragraph border line. This control should follow the paragraph border controls \brdrt, \brdrr, \brdrb, and \brdrl.	
\brdrcfN	N is the color of the paragraph border from the color table in the RTF header. This control should follow the paragraph border controls \brdrt, \brdrr, \brdrb, and \brdrl.	
\brspN	Space in twips between borders and the paragraph.	

Paragraph Shading and Background Pattern

Control Word	Meaning	
\shadingN	N is the shading of the paragraph in hundredths of a percent.	
\bghoriz	Specifies a horizontal background pattern for the paragraph.	
\bgvert	Specifies a vertical background pattern for the paragraph.	
\bgfdiag	Specifies a forward diagonal background pattern for the paragraph (\\\\).	
\bgbdiag	Specifies a backward diagonal background pattern for the paragraph (////).	
\bgcross	Specifies a cross‑hatched background pattern for the paragraph.	
\bgdcross	Specifies a diagonal cross‑hatched background pattern for the paragraph.	
\bgdkhoriz	Specifies a dark horizontal background pattern for the paragraph.	
\bgdkvert	Specifies a dark vertical background pattern for the paragraph.	
\bgdkfdiag	Specifies a dark forward diagonal background pattern for the paragraph (\\\\).	
\bgdkbdiag	Specifies a dark backward diagonal background pattern for the paragraph (////).	
\bgdkcross	Specifies a dark cross‑hatched background pattern for the paragraph.	
\bgdkdcross	Specifies a dark diagonal cross‑hatched background pattern for the paragraph.	
\cfpatN	N is the line color of the background pattern.	
\cbpatN	N is the background color of the background pattern.	

Positioned Objects and Frames

The following paragraph‑formatting control words specify the location of a paragraph on the page. Consecutive paragraphs with the same frame formatting are considered to be part of the same frame. For two framed paragraphs to appear at the same position on a page, they must be separated by a paragraph with different or no frame information.

Control Word	Meaning	
\abswN	N is the width of the frame in twips.	
\abshN	N is the height of the frame in twips. A positive number indicates the minimum height of the frame, and a negative number indicates the exact height of the frame. A value of 0 indicates that the height of the frame adjusts to the contents of the frame. Zero is the default for frames where no height is given.	

Horizontal Position

Control Word	Meaning	
\phmrg	Use the margin as the horizontal reference frame.	
\phpg	Use the page as the horizontal reference frame.	
\phcol	Use the column as the horizontal reference frame. This is the default if no horizontal reference frame is given.	
\posxN	Positions the frame N twips from the left edge of the reference frame.	
\posxc	Centers the frame horizontally within the reference frame.	
\posxi	Positions the paragraph horizontally inside the reference frame.	
\posxo	Positions the paragraph horizontally outside the reference frame.	
\posxr	Positions the paragraph to the right within the reference frame.	
\posxl	Positions the paragraph to the left within the reference frame. This is the default if no horizontal positioning information is given.	

Vertical Position

Control Word	Meaning	
\pvmrg	Use the margin as the vertical reference frame.	
\pvpg	Use the page as the vertical reference frame.	
\pvpara	Positions the reference frame vertically relative to the top of the top‑left corner of the next unframed paragraph in the RTF stream. This is the default if no vertical frame positioning information is given.	
\posyN	Positions the paragraph N twips from the top edge of the reference frame.	
\posyil	Positions the paragraph vertically to be in line.	
\posyt	Positions the paragraph at the top of the reference frame.	
\posyc	Centers the paragraph vertically within the reference frame.	
\posyb	Positions the paragraph at the bottom of the reference frame.	

Text Wrapping

Control Word	Meaning	
\dxfrtextN	Distance in twips of a positioned paragraph from the main text flow in all directions. In Word for Windows 2.0, this control affects only the horizontal distance from the text on each side of the frame.	
\dyfrtextN	N is the vertical distance in twips from the text above and below the frame.	

The following is an example of absolute-positioned text in a document:
. . .	
\par \pard \pvpg\phpg\posxc\posyt\absw5040\dxfrtest173 abs pos para1
\par \pard \phmrg\posxo\posyc\dxfrtext1152 abs pos para2
 	
A	Text to be positioned

Tables

There is no RTF table group. A table is a collection of paragraphs, and a table row is a continuous sequence of paragraphs partitioned into cells. The \intbl paragraph formatting control word identifies the paragraph as part of a table. This control is inherited between paragraphs that do not have paragraph properties reset with a \pard.

The last paragraph of a cell is terminated by a cell mark (the \cell control word), and the row is terminated by a row mark (the \row control word). The following control words further define the table:

Control Word	Meaning	
\trowd	Sets the table row defaults.	
\trgaphN	Half the space between the cells of a table row in twips.	
\cellxN	Moves the right boundary of a table cell, including its half of the space between cells.	
\clmgf	The first cell in a range of table cells to be merged.	
\clmrg	The contents of the table cell are merged with those of the preceding cell.	

Cell Borders and Shading

Control Word	Meaning	
\clbrdrb	The bottom table cell border.	
\clbrdrt	The top table cell border.	
\clbrdrl	The left table cell border.	
\clbrdrr	The right table cell border.	

Row Formatting

Control Word	Meaning	
\trql	Left‑justifies a table row with respect to its containing column.	
\trqr	Right‑justifies a table row with respect to its containing column.	
\trqc	Centers a table row with respect to its containing column.	
\trleftN	The position of the leftmost edge of the table with respect to the left edge of its column.	
\trrhN	The height of a table row in twips; when 0, the height is sufficient for all the text in the line; when positive, the height is guaranteed to be at least the specified height; when negative, the absolute value of the height is used, regardless of the height of the text in the line.	

Cell Shading and Background Pattern

Control Word	Meaning	
\clshdngN	N is the shading of a table cell in hundredths of a percent. This control should be included in RTF along with cell border information.	
\clbghoriz	Specifies a horizontal background pattern for the cell.	
\clbgvert	Specifies a vertical background pattern for the cell.	
\clbgfdiag	Specifies a forward diagonal background pattern for the cell (\\\\).	
\clbgbdiag	Specifies a backward diagonal background pattern for the cell (////).	
\clbgcross	Specifies a cross‑hatched background pattern for the cell.	
\clbgdcross	Specifies a diagonal cross‑hatched background pattern for the cell.	
\clbgdkhor	Specifies a dark horizontal background pattern for the cell.	
\clbgdkvert	Specifies a dark vertical background pattern for the cell.	
\clbgdkfdiag	Specifies a dark forward diagonal background pattern for the cell (\\\\).	
\clbgdkbdiag	Specifies a dark backward diagonal background pattern for the cell (////).	
\clbgdkcross	Specifies a dark cross‑hatched background pattern for the cell.	
\clbgdkdcross	Specifies a dark diagonal cross‑hatched background pattern for the cell.	
\clcfpatN	N is the line color of the background pattern.	
\clcbpatN	N is the background color of the background pattern.	

The following example shows some table text:

. . .
\par \trowd \trqc\trgaph108\trrh280\trleft36
\clbrdrt\brdrth \clbrdrl\brdrth \clbrdrb\brdrdb
\clbrdrr\brdrdb \cellx3636\clbrdrt\brdrth
\clbrdrl\brdrdb \clbrdrb\brdrdb \clbrdrr\brdrdb
\cellx7236\clbrdrt\brdrth \clbrdrl\brdrdb
\clbrdrb\brdrdb \clbrdrr\brdrdb \cellx10836\pard \intbl
\cell \pard \intbl \cell \pard \intbl \cell \pard \intbl \row
\trowd \trqc\trgaph108\trrh280\trleft36 \clbrdrt\brdrdb
\clbrdrl\brdrth \clbrdrb \brdrsh\brdrs \clbrdrr\brdrdb
\cellx3636\clbrdrt\brdrdb \clbrdr \brdrdb
\clbrdrb\brdrsh\brdrs \clbrdrr\brdrdb
\cellx7236\clbrdrt\brdrdb \clbrdr \brdrdb
\clbrdrb\brdrsh\brdrs \clbrdrr\brdrdb \cellx10836\pard
\intbl \cell \pard \intbl \cell \pard \intbl \cell \pard
\intbl \row \pard
. . .

Character Formatting Properties

The last group controls character formatting properties. A control word preceding plain text turns on the specified attribute. Some control words (indicated in the following table by an asterisk following the description) can be turned off by the control word followed by 0 (zero). For example, \b turns on bold, whereas \b0 turns off bold. The character formatting control words are listed in the following table:

Control Word	Meaning	
\plain	Resets application’s default character formatting properties.	
\b	Turns on boId.*	
\caps	Turns on all uppercase.*	
\deleted	Marks the text as deletion revision marked.*	
\dnN	Sets the subscript position in half‑points (the default is 6).	
\expndN	Sets the expansion or compression of the space between characters in quarterpoints; a negative value compresses the space (the default is 0).	
\fN	Identifies the font number.	
\fsN	Sets the font size in half‑points (the default is 24).	
\i	Turns on italic.*	
\outl	Turns on outline.*	
\revised	Indicates that text has been added since revision marking was turned on.	
\scaps	Turns on small capitals.*	
\shad	Turns on shadow.*	
\strike	Turns on strikethrough.	
\ul	Turns on continuous underline. \ul0 turns off all underlining.	
\uld	Turns on dotted underline.	
\uldb	Turns on double underline.	
\ulnone	Turns off all underlining.	
\ulw	Turns on word underline.	
\upN	Sets the superscript position in half‑points (the default is 6).	
\v	Turns on hidden text.*	
\langN	Applies a language to a character. N is a number corresponding to a language. The following table defines the standard languages used by Microsoft. This table was generated by the Unicode group for use with TrueType® and Unicode. A \plain control resets the language property to the language defined by \deflangN in the document properties.	

Language Name	Language ID			Language Name	Language ID	
No Language	0x0400			Icelandic	0x040f	
Albanian	0x041c			ltalian	0x0410	
Arabic	0x0401			Japanese	0x0411	
Bahasa	0x0421			Korean	0x0412	
Belgian Dutch	0x0813			Norwegian (Bokmal)	0x0414	
Belgian French	0x080c			Norwegian (Nynorsk)	0x0814	
Brazilian Portuguese	0x0416			Polish	0x0415	
Bulgarian	0x0402			Portuguese	0x0816	
Catalan	0x0403			Rhaeto-Romanic	0x0417	
Croato-Serbian (Latin)	0X041a			Romanian	0x0418	
Czech	0x0405			Russian	0x0419	
Danish	0x0406			Serbo-Croatian (Cyrillic)	0x081a	
Dutch	0x0413			Simplified Chinese	0x0804	
English (Aus.)	0x0c09			Slovak	0x041b	
English (U.K.)	0x0809			Spanish (Castilian)	0x040a	
English (U.S.)	0x0409			Spanish (Mexican)	0x080a	
Finnish	0x040b			Swedish	0x041d	
French	0x040c			Swiss French	0x100c	
French (Canadian)	0x0c0c			Swiss German	0x0807	
German	0x0407			Swiss Italian	0x0810	
Greek	0x0408			Thai	0x041e	
Hebrew	0x040d			Traditional Chinese	0x0404	
Hungarian	0x040e			Turkish	0x041f	
				Urdu	0x0420	

To read negative \expnd values from Word for the Macintosh, an RTF reader should use only the low‑order 6 bits of the value read. Word for the Macintosh does not emit negative values for \expnd. Instead, it treats values from 57 through 63 as –7 through –1 , respectively (the low‑order 6 bits of 57 through 63 are the same as –7 through 1).

Special Characters

The RTF standard includes control words for special characters. If a special character control word is not recognized by the RTF reader, the control word is ignored, and the text following it is considered plain text. RTF specification is flexible enough to allow new special characters to be added for interchange with other software.

The special RTF characters are listed in the following table:

Control Word	Meaning	
\chdate	The current date (as in headers).	
\chdpl	The current date in long format; for example, Tuesday, June 23, 1992.	
\chdpa	The current date in abbreviated format; for example, Tue, Jun 23, 1992.	
\chtime	The current time (as in headers).	
\chpgn	The current page number (as in headers).	
\chftn	An automatic footnote reference (the footnotes follow in a group).	
\chatn	An annotation reference (the annotation text follows in a group).	
\chftnsep	An anchoring character for the footnote separator.	
\chftnsepc	An anchoring character for the footnote continuation.	
\cell	The end of a table cell.	
\row	The end of a table row.	
\par	The end of a paragraph.	
\sect	The end of a section and a paragraph.	
\page	A required page break.	
\column	A required column break.	
\line	A required line break (no paragraph break).	
\tab	A tab character; the same as ASCII 9.	
\emdash	An em (—) dash. This is character 151 in the ANSI character set and character 208 in the Macintosh character set.	
\endash	An en (–) dash. This is character 150 in the ANSI character set and character 209 in the Macintosh character set.	
\bullet	A bullet character. This is character 149 in the ANSI character set and character 165 in the Macintosh character set.	
\Iquote	An opening single quotation mark. This is character 145 in the ANSI character set and character 212 in the Macintosh character set.	
\rquote	A closing single quotation mark. This is character 146 in the ANSI character set and character 213 in the Macintosh character set.	
\Idblquote	An opening double quotation mark. This is character 147 in the ANSI character set and character 210 in the Macintosh character set.	
\rdblquote	A closing double quotation mark. This is character 148 in the ANSI character set and character 211 in the Macintosh character set.	
\|	A formula character.	
\~	A nonbreaking space.	
\-	An optional hyphen.	
\_	A nonbreaking hyphen.	
\:	Specifies a subentry in an index entry.	
\*	Marks a destination whose text should be ignored if not understood by the RTF reader.	
\'hh	A hexadecimal value, based on the specified character set (may be used to identify 8-bit values).	
\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.	

Note: An ASCII 9 is accepted as a tab character. A carriage return (character value 13) or linefeed character (character value 10) will be treated as a \par control if the character is preceded by a backslash. You must include the backslash, or RTF ignores the control word. (You may also want to insert a carriage‑return/linefeed pair without backslashes at least every 255 characters for better text transmission over communication lines.)

Index of RTF Control Words and Symbols

The page numbers listed in the following index are the pages on which information about the RTF control word entries appear:

\'hh, 31
\*, 31
\*\fldinst, 14
\*\nextfile, 19
\*\template, 19
\‑,31
\:, 31
\_, 31
\|, 31
\~, 31
\abshN, 25
\abswN, 25
\alt, 31
\ansi, 5
\author, 13
\b, 28
\bgbdiag, 9, 25
\bgcross, 9, 25
\bgdcross, 9, 25
\bgdkbdiag, 9, 25
\bgdkcross, 9, 25
\bgdkdcross, 9, 25
\bgdkfdiag, 9, 25
\bgdkhoriz, 9, 25
\bgdkvert, 9, 25
\bgfdiag, 9, 25
\bghoriz, 9, 25
\bgvert, 9, 25
\binfsxnN, 20
\binN, 9
\binsxnN, 20
\bkmkpub, 18
\blueN, 7
\box, 24
\brdrb, 24
\brdrbar, 24
\brdrbtw, 24
\brdrcfN, 9, 24
\brdrdb, 9, 24
\brdrdot, 9, 24
\brdrhair, 9, 24
\brdrl, 24
\brdrr, 24
\brdrs, 9, 24
\brdrsh, 9, 24
\brdrt, 24
\brdrth, 9, 24
\brdrwN, 9, 24
\brspN, 24
\bullet, 30
\buptim, 13
\bxe, 15
\caps, 28
\cbN, 7
\cbpatN, 9, 25
\cell, 30
\cellxN, 27
\cfN, 7
\cfpatN, 9, 25
\chatn, 30
\chdate, 30
\chdpa, 30
\chdpl, 30
\chftn, 30
\chfmsep, 30
\chftnsepc, 30
\chpgn, 30
\chtime, 30
\clbgbdiag, 27
\clbgcross. 27
\clbgdcross, 28
\clbgdkbdiag, 28
\clbgdkcross, 28
\clbgdkdcross, 28
\clbgdkfdiag, 28
\clbgdkhor, 28
\clbgdkvert, 28
\clbgfdiag, 27
\clbghoriz, 27
\clbgvert, 27
\clbrdrb, 27
\clbrdrl, 27
\clbrdrr, 27
\clbrdrt, 27
\clcbpatN, 28
\clcfpatN, 28
\clmgf, 27
\clmrg, 27
\clshdngN, 27
\colsN, 21
\colsxN, 21
\column, 30
\comment, 13
\creatim, 13
\ctrl, 31
\defformat, 19
\deflangN, 19
\deftabN, 19
\deleted, 28
\dibitmapN, 8
\dnN, 28
\doccomm, 13
\dxfrextN, 26
\dyfrextN, 26
\dyN, 13
\edminsN, 13
\emdash, 30
\endash, 30
\enddoc, 19
\endnhere, 20
\endnotes, 19
\expndN, 28
\facingp, 20
\fdecor, 6
\fiN, 23
\flddirty, 14
\fldedit, 14
\fldlock, 14
\fldpriv, 14
\fldrslt, 14
\fmodern, 5
\fN, 28
\fnil, 5
\fnN, 3 1
\footerf, 12
\footerl, 12
\footerr, 12
\footeryN, 22
\fracwidth, 19
\fRoman, 5
\fscript, 5
\fsN, 29
\fswiss, 5
\ftech, 6
\ftnbj, 19
\ftncn, 19
\ftnrestart, 19
\ftnsep, 19
\ftnsepc, 19
\ftnstart, 19
\ftntj, 19
\greenN, 7
\gutterN, 20
\guttersxnN, 22
\headerf, 12
\headerl, 12
\headerr, 12
\headeryN, 22
\hrN, 13
\hyphhotz, 19
\i, 29
\idN, 13
\intbl, 23
\ixe, 15
\keep, 23
\keepn, 23
\keycode, 6
\keywords, 13
\landscape, 20
\langN, 29
\Idblquote, 31
\liN, 23
\line, 30
\linebetcol, 21
\linecont, 21
\linemodN, 21
\lineppage, 21
\linerestart, 21
\linestartN, 19
\linestartsN, 21
\linexN, 21
\linkself, 16
\Indscpsxn, 22
\Iquote, 30
\mac, 5
\macpict, 7
\makebackup, 19
\margbN, 20
\margbsxnN, 22
\marglN, 20
\marglsxnN, 21
\margmirror, 20
\rnargrN, 20
\rnargrsxnN, 21
\margtN, 20
\margtsxnN, 21
\minN, 13
\moN, 13
\nofcharsN, 13
\nofpagesN, 13
\nofwordsN, 13
\noline, 23
\objalias, 17, 18
\objautlink, 16
\objclass, 16
\objcropbN, 17
\objcroplN, 17
\objcroprN, 17
\objcroptN, 17
\objdata, 17
\objemb, 16
\objhN, 17
\objicemb, 16
\objlink, 16
\objlock, 16
\objname, 16
\objscalexN, 17
\objscaleyN, 17
\objsect, 17, 18
\objsetsize, 17
\objsub, 16
\objtransyN, 17
\objwN, 17
\operator, 13
\outl, 29
\page,30
\pagebb, 23
\paperhN, 20
\paperwN, 20
\par, 30
\pard, 23
\pc, 5
\pca, 5
\pghsxnN, 21
\pgncont, 22
\pgndec, 22
\pgnlcltr, 22
\pgnlcrm, 22
\pgnrestart, 22
\pgnstartN, 20
\pgnstartsN, 22
\pgnucltr, 22
\pgnucrm, 22
\pgnxN, 22
\pgnyN, 22
\pgwsxnN, 21
\phcol, 25
\phmrg, 25
\phpg, 25
\piccropbN, 8
\piccroplN, 8
\piccroprN, 8
\piccroptN, 8
\pichgoalN, 8
\pichN, 8
\picscaled, 8
\picscalexN, 8
\picscaleyN, 8
\picwgoalN, 8
\picwN, 8
\plain, 28
\pmmetafileN, 7
\posxc, 26
\posxi, 26
\posxl, 26
\posxN, 25
\posxo, 26
\posxr, 26
\posyb, 26
\posyc, 26
\posyil, 26
\posyN, 26
\posyt, 26
\printim, 13
\psover, 19
\pubauto, 18
\pvmrg, 26
\pvpara, 26
\pvpg, 26
\qc, 23
\qj, 23
\ql, 23
\qr, 23
\rdblquote, 31
\redN, 7
\result, 18
\revbarN, 20
\revised, 29
\revisions, 20
\revpropN, 20
\revtim, 13
\riN, 23
\row, 30
\rquote, 30
\rsltbmp, 17
\rsltmerge, 17
\rsltpict, 17
\rsltrtf, 17
\rslttxt, 17
\rxe BookmarkName, 15
\saN, 23
\sbasedonN, 6
\sbkcol, 21
\sbkeven, 21
\sbknone, 21
\sbkodd, 21
\sbkpage, 21
\sbN, 23
\sbys, 23
\scaps, 29
\sect, 30
\sectd, 20
\shad, 29
\shadingN, 9, 25
\shift, 31
\slN, 23
\sN, 23
\snextN, 6
\strike, 29
\subject, 13
\tab, 30
\tbN, 24
\tcfN, 15
\tclN, 15
\title, 13
\titlepg, 22
\tldot, 24
\tleq, 24
\tlhyph, 24
\tlth, 24
\tlul, 24
\tqc, 24
\tqdec, 24
\tqr, 24
\trgaphN, 27
\trleftN, 27
\trowd, 27
\trqc, 27
\trql, 27
\trqr, 27
\trrhN, 27
\txe Text, 15
\txN, 24
\ul, 29
\uld, 29
\uldb, 29
\ulnone, 29
\ulw, 29
\upN, 29
\v, 29
\vernN, 13
\versionN, 13
\vertal, 22
\vertalc, 22
\vertalj, 22
\vertalt, 22
\wbitmapN, 8
\wbmbitspixelN, 8
\wbmplanesN, 8
\wbmwidthbytesN, 8
\widowctrl, 20
\wmetafileN, 8
\yrN, 13
.