Rich Text Format (RTF) Version 規格 1.5 - 2

1 篇文章 / 0 new
author
Rich Text Format (RTF) Version 規格 1.5 - 2

Character Text

Character text has the following syntax:

<char> <ptext> | <atext> | '{' <char> '}'
<ptext> (<chrfmt>* <data>+ )+
<data> #PCDATA | <spec> | <pict> | <obj> | <do> | <foot> | <annot> | <field> | <idx> | <toc> | <book>

 

Font (character) Formatting Properties

These control words (described as <chrfmt> in the syntax description) change font (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 . For example, \b turns on bold, while \b0 turns off bold.

The font (character)-formatting control words are listed in the following table.

Control word Meaning
\plain Reset font (character) formatting properties to a default value defined by the application (for example, bold, underline and italic are disabled; font size is reset to 12 pt). The associated font (character) formatting properties (described in the section "Associated Font (character) Properties" on page 37 of this Application Note) are also reset.
\animtextN Animated text properties.

1 Las Vegas Lights

2 Blinking background

3 Sparkle text

4 Marching black ants

5 Marching red ants

6 Shimmer

\b Bold.*
\caps All capitals.*
\charscalexN Character scaling value. The N argument is a value representing a percentage (the default is 100).
\deleted Marks the text as deletion revision marked.*
\dnN Subscript position in half-points (the default is 6).
\embo Emboss.
\impr Engrave.
\sub Subscripts text and shrinks point size according to font information.
\nosupersub Turns off superscripting or subscripting.
\expndN Expansion or compression of the space between characters in quarter-points; a negative value compresses (the default is 0).
\expndtwN Expansion or compression of the space between characters in twips; a negative value compresses. For backward compatibility, both \expndtw and \expnd should be emitted.
\kerningN Point size (in half-points) above which to kern character pairs. \kerning0 turns off kerning.
\fN Font number. N refers to an entry in the font table.
\fsN Font size in half-points (the default is 24).
\i Italic.*
\outl Outline.*
\scaps Small capitals.*
\shad Shadow.*
\strike Strikethrough.*
\strikedl Double strikethrough.
\ul Continuous underline. \ul0 turns off all underlining.
\uld Dotted underline.
\uldash Dash underline.
\uldashd Dot dash underline.
\uldashdd Dot dot dash underline.
\uldb Double underline.
\ulnone Stops all underlining.
\ulth Thick underline
\ulw Word underline.
\ulwave Wave underline.
\upN Superscript position in half-points (the default is 6).
\super Superscripts text and shrinks point size according to font information.
\v Hidden text.*
\cfN Foreground color (the default is 0).
\cbN Background color (the default is 0).
\rtlch The character data following this control word will be treated as a right-to-left run.
\ltrch The character data following this control word will be treated as a left-to-right run (the default).
\csN Designates character style. If a character style is specified, style properties must be specified with the character run. N refers to an entry in the style table.
\cchsN Indicates any characters not belonging to the default document character set and tells which character set they do belong to. Macintosh character sets are represented by values greater than 255. The values for N correspond to the values for the \ fcharset control word.
\langN Applies a language to a character. N is a number corresponding to a language. The \plain control word resets the language property to the language defined by \deflangN in the document properties.

 

The following table defines the standard languages used by Microsoft. This table was generated by the Unicode group for use with TrueType and Unicode.

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

 

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).

Character Borders and Shading

Character shading has the following syntax.

<shading> (\chshdng | <pat>) \chcfpat? \chcbpat?
<pat> \chbghoriz | \chbgvert | \chbgfdiag | \chbgbdiag | \chbgcross | \chbgdcross | \chbgdkhoriz | \chbgdkvert | \chbgdkfdiag | \chbgdkbdiag | \chbgdkcross | \chbgdkdcross
 
Control word Meaning
\chbrdr Character border (border always appears on all sides).
\chshdngN Character shading. The N argument is a value representing the shading of the text in hundredths of a percent.
\chcfpatN N is the color of the background pattern, specified as an index into the document's color table.
\chcbpatN N is the fill color, specified as an index into the document's color table.
\chbghoriz Specifies a horizontal background pattern for the text.
\chbgvert Specifies a vertical background pattern for the text.
\chbgfdiag Specifies a forward diagonal background pattern for the text (\\\\).
\chbgbdiag Specifies a backward diagonal background pattern for the text (////).
\chbgcross Specifies a cross background pattern for the text.
\chbgdcross Specifies a diagonal cross background pattern for the text.
\chbgdkhoriz Specifies a dark horizontal background pattern for the text.
\chbgdkvert Specifies a dark vertical background pattern for the text.
\chbgdkfdiag Specifies a dark forward diagonal background pattern for the text (\\\\).
\chbgdkbdiag Specifies a dark backward diagonal background pattern for the text (////).
\chbgdkcross Specifies a dark cross background pattern for the text.
\chbgdkdcross Specifies a dark diagonal cross background pattern for the text.

The color, width, and border style keywords for character borders are the same as the keywords for paragraph borders.

Control word Meaning

Track Changes (Revision Mark) properties

\revised Text has been added since revision marking was turned on.
\revauthN Index into the revision table. The content of the Nth group in the revision table is considered to be the author of that revision.
\revdttmN Time of the revision. The 32-bit DTTM structure is emitted as a long integer.
\crauthN Index into the revision table. The content of the Nth group in the revision table is considered to be the author of that revision.

Note This keyword is used to indicate formatting revisions, such as bold, italic, and so on.

\crdateN Time of the revision. The 32-bit DTTM structure is emitted as a long integer.
\revauthdelN Index into the revision table. The content of the Nth group in the revision table is considered to be the author of that deletion.
\revdttmdelN Time of the deletion. The 32-bit DTTM structure is emitted as a long integer.

 

Associated Character Properties

Bidirectional-aware text processors often need to associate a Latin (or other left-to-right) font with an Arabic or Hebrew (or other right-to-left) font. The association is needed to match commonly used pairs of fonts in name, size, and other attributes. Although RTF defines a broad variety of associated character properties, any implementation may choose not to implement a particular associated character property and share the property between the Latin and Arabic fonts.

Property association uses the following syntax:

<atext> <ltrrun> | <rtlrun>
<ltrrun> \rtlch \af & <aprops>* \ltrch <ptext>
<rtlrun> \ltrch \af & <aprops>* \rtlch <ptext>

Here are some examples of property association:

\ltrch\af2\ab\au\rtlch\u Sample Text

This is a right-to-left run. Text will use the default bidirectional font, and will be underlined. The left-to-right font associated with this run is font 2 (in the font table) with bolding and underlining.

\plain\rtlch\ltrch Sample Text 

This is a left-to-right run. The right-to-left font and the left-to-right font use the default font (specified by \deff).

\rtlch\af5\ab\ai\ltrch\u Sample Text

This is a left-to-right run. The right-to-left font is font 5, bold and italicized. The left-to-right font is the default font, underlined. If the reader does not support underlining in the associated font, both fonts will be underlined.

The property association control words (described as <aprops> in the syntax description) are listed in the following table. 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 .

Control word Meaning
\ab Associated font is bold.*
\acaps Associated font is all capitals.*
\acfN Associated foreground color (the default is 0).
\adnN Associated font is subscript position in half-points (the default is 6).
\aexpndN Expansion or compression of the space between characters in quarter-points; a negative value compresses (the default is 0).
\afN Associated font number (the default is 0).
\afsN Associated font size in half-points (the default is 24).
\ai Associated font is italic.*
\alangN Language ID for the associated font. (This uses the same language ID codes described on page 35 of this Application Note.)
\aoutl Associated font is outline.*
\ascaps Associated font is small capitals.*
\ashad Associated font is shadow.*
\astrike Associated font is strikethrough.*
\aul Associated font is continuous underline. \aul0 turns off all underlining for the alternate font.
\auld Associated font is dotted underline.
\auldb Associated font is double underline.
\aulnone Associated font is no longer underlined.
\aulw Associated font is word underline.
\aupN Superscript position in half-points (the default is 6).

 

Highlighting

This property applies highlighting to text. The formatting is not a character format, so it cannot be part of a style definition.

Control Word Definition
\highlightN Highlights the specified text. N specifies the color.

 

For \highlight, the N argument can have the following values:

Value Description
1 Black
2 Blue
3 Cyan
4 Green
5 Magenta
6 Red
7 Yellow
8 Unused
9 Dark Blue
10 Dark Cyan
11 Dark Green
12 Dark Magenta
13 Dark Red
14 Dark Yellow
15 Dark Gray
16 Light Gray

 

Special Characters

The RTF Specification includes control words for special characters (described as <spec> in the character-text syntax description). If a special-character control word is not recognized by the RTF reader, it is ignored, and the text following it is considered plain text. The 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 Current date (as in headers).
\chdpl Current date in long format (for example, Thursday, October 28, 1997).
\chdpa Current date in abbreviated format (for example, Thu, Oct 28, 1997).
\chtime Current time (as in headers).
\chpgn Current page number (as in headers).
\sectnum Current section number (as in headers).
\chftn Automatic footnote reference (footnotes follow in a group).
\chatn Annotation reference (annotation text follows in a group).
\chftnsep Anchoring character for footnote separator.
\chftnsepc Anchoring character for footnote continuation.
\cell End of table cell.
\row End of table row.
\par End of paragraph.
\sect End of section and paragraph.
\page Required page break.
\column Required column break.
\line Required line break (no paragraph break).
\softpage Nonrequired page break. Emitted as it appears in galley view.
\softcol Nonrequired column break. Emitted as it appears in galley view.
\softline Nonrequired line break. Emitted as it appears in galley view.
\softlheightN Nonrequired line height. This is emitted as a prefix to each line.
\tab Tab character.
\emdash Em-dash (--).
\endash En-dash (-).
\emspace Nonbreaking space equal to width of character "m" in current font. Some old RTF writers use the construct `{\emspace }' (with two spaces before the closing brace) to trick readers unaware of \emspace into parsing a regular space. A reader should interpret this as an \emspace and a regular space.
\enspace Nonbreaking space equal to width of character "n" in current font. Some old RTF writers use the construct `{\enspace }' (with two spaces before the closing brace) to trick readers unaware of \enspace into parsing a regular space. A correct reader should interpret this as an \enspace and a regular space.
\bullet Bullet character.
\lquote Left single quotation mark.
\rquote Right single quotation mark.
\ldblquote Left double quotation mark.
\rdblquote Right double quotation mark.
\| Formula character. (Used by Word 5.1 for the Macintosh as the beginning delimiter for a string of formula typesetting commands.)
\~ Nonbreaking space.
\- Optional hyphen.
\_ 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).
\ltrmark The following characters should be displayed from left to right; usually found at the start of \ltrch runs.
\rtlmark The following characters should be displayed from right to left; usually found at the start of \rtlch runs.
\zwj Zero-width joiner. This is used for ligating (joining) characters.
\zwnj Zero-width nonjoiner. This is used for unligating a character.

 

A carriage return (character value 13) or linefeed (character value 10) will be treated as a \par control if the character is preceded by a backslash. You must include the backslash; otherwise, 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.)

A tab (character value 9) should be treated as a \tab control word. Not all RTF readers understand this; therefore, an RTF writer should always emit the control word for tabs.

The following are the code values for the special characters listed.

Control word Word for Windows and OS/2 Apple Macintosh
\bullet 149 0xA5
\endash 150 0xD1
\emdash 151 0xD0
\lquote 145 0xD4
\rquote 146 0xD5
\ldblquote 147 0xD2
\rdblquote 148 0xD3

 

Document Variables

Document variables are definable and accessed through macros. The group has the following syntax.

<variables> `{\*' <docvar>`{' <varname> `}' `{' <vartext> `}' `}'*
<docvar> \docvar
<varname> #PCDATA
<vartype> #PCDATA

 

Control Word Definition
\ docvar A group that defines a document variable name and its value.

 

Bookmarks

This destination may specify one of two control words: \*\bkmkstart, which indicates the start of the specified bookmark, and \*\bkmkend, which indicates the end of the specified bookmark.

Bookmarks have the following syntax:

<book> <bookstart> | <bookend>
<bookstart> '{\*' \bkmkstart (\bkmkcolf? & \bkmkcoll?) #PCDATA '}'
<bookend> '{\*' \bkmkend #PCDATA '}'

 

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}

The bookmark start and the bookmark end are matched with the bookmark tag. In the example, the bookmark tag is "paradigm." Each bookmark start should have a matching bookmark end; however, the bookmark start and the bookmark end may be in any order.

\bkmkcolfN is used to denote the first column of a table covered by a bookmark. If it is not included, the first column is assumed. \bkmkcollN is used to denote the last column. If it is not used, the last column is assumed. These controls are used within the \*\bkmkstart destination following the \bkmkstart control. For example, {\*\bkmkstart\bkmkcolf2\bkmkcoll5 Table1} places the bookmark "Table1" on columns 2 through 5 of a table.

Pictures

An RTF file can include pictures created with other applications. These pictures can be in hexadecimal (the default) or binary format. Pictures are destinations, and begin with the \pict control word. The \pict keyword is preceded by \*\shppict destination control keyword as described in the following example. A picture destination has the following syntax:

<pict> '{' \pict (<brdr>? & <shading>? & <picttype> & <pictsize> & <metafileinfo>?) <data> '}'
<picttype> | \emfblip | \pngblip | \jpegblip | \macpict | \pmmetafile | \wmetafile | \dibitmap <bitmapinfo> | \wbitmap <bitmapinfo>
<bitmapinfo> \wbmbitspixel & \wbmplanes & \wbmwidthbytes
<pictsize> (\picw & \pich) \picwgoal? & \pichgoal? \picscalex? & \picscaley? & \picscaled? & \piccropt? & \piccropb? & \piccropr? & \piccropl?
<metafileinfo> \picbmp & \picbpp
<data> (\bin #BDATA) | #SDATA

 

These control words are described in the following table. Some measurements in this table are in twips; a twip is one-twentieth of a point.

Control Word Meaning
\emfblip Source of the picture is an EMF (enhanced metafile).
\pngblip Source of the picture is a PNG.
\jpegblip Source of the picture is a JPEG.
\shppict Specifies a Word 97 picture. This is a destination control word.
\nonshppict Specifies that Word 97 has written a {\pict destination that it will not read on input. This keyword is for compatibility with other readers.
\macpict Source of the picture is QuickDraw.
\pmmetafileN Source of the picture is an OS/2 metafile. The N argument identifies the metafile type. The N values are described on page 43 of this Application Note.
\wmetafileN Source of the picture is a Windows metafile. The N argument identifies the metafile type (the default is 1).
\dibitmapN Source of the picture is a Windows device-independent bitmap. The N argument identifies the bitmap type (must equal 0).

The information to be included in RTF from a Windows device-independent bitmap is the concatenation of the BITMAPINFO structure followed by the actual pixel data.

\wbitmapN Source of the picture is a Windows device-dependent bitmap. The N argument identifies the bitmap type (must equal 0).

The information to be included in RTF from a Windows device-dependent bitmap is the result of the GetBitmapBits function.

Example:

{\*\shppict {\pict \emfblip ..... }}{\nonshppict {\pict ....}}

For more information on the GetDIBits and GetBitmapBits functions and the structure of Windows device-independent and device-dependent bitmaps, see Volume 1 and Volume 2 of the Programmer's Reference in the Microsoft Windows 3.1 Software Development Kit. For best device-independence and interoperability with Microsoft products, however, use of the \wbitmap and \dibitmap control words is discouraged. Rather, bitmaps should be embedded within Windows metafiles and the \wmetafile control word used. For more information on embedding bitmaps within metafiles, see Volume 1 and Volume 2 of the Programmer's Reference in the Microsoft Windows 3.1 Software Development Kit.

Control word Meaning

Bitmap Information

\wbmbitspixelN Number of adjacent color bits on each plane needed to define a pixel (the default is 1). Possible values are 1 (monochrome), 4 (16 colors), 8 (256 colors) and 24 (RGB).
\wbmplanesN Number of bitmap color planes (must equal 1).
\wbmwidthbytesN Specifies the number of bytes in each raster line. This value must be an even number because the Windows graphics device interface (GDI) assumes that the bit values of a bitmap form an array of integer (two-byte) values. In other words, \wbmwidthbytes times 8 must be the next multiple of 16 greater than or equal to the \picw (bitmap width in pixels) value.

Picture Size, Scaling, and Cropping

\picwN xExt field if the picture is a Windows metafile; picture width in pixels if the picture is a bitmap or from QuickDraw. The N argument is a long integer.
\pichN yExt field if the picture is a Windows metafile; picture height in pixels if the picture is a bitmap or from QuickDraw. The N argument is a long integer.
\picwgoalN Desired width of the picture in twips. The N argument is a long integer.
\pichgoalN Desired height of the picture in twips. The N argument is a long integer.
\picscalexN Horizontal scaling value. The N argument is a value representing a percentage (the default is 100).
\picscaleyN 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.
\picprop Indicates there are shape properties applied to an inline picture. This is a destination control word.
\piccroptN 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 picture (the default is 0).
\piccropbN 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 picture (the default is 0).
\piccroplN 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 picture (the default is 0).
\piccroprN 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 picture (the default is 0).

Metafile Information

\picbmp Specifies whether a metafile contains a bitmap.
\picbppN Specifies the bits per pixel in a metafile bitmap. The valid range is 1-32, with 1, 4, 8, and 24 being recognized.

Picture Data

\binN The picture is in binary format. The numeric parameter N is the number of bytes that follow. Unlike all other controls, this control word takes a 32-bit parameter.
\blipupiN N represents units per inch on a picture (only certain image types need or output this)
\blipuid XXXXX Used as: {\*\blipuid XXXXX} where XXXX is a 16-byte identification number for the image.
\bliptagN A mostly unique identifier for a picture, where N is a long integer value.

 

The \wbitmap control word is optional. If no other picture type 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

 

For more information about these types, see volume 1 of the Programmer's Reference in the Microsoft Windows 3.1 Software Development Kit.

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

Type N argument
PU_ARBITRARY 0x0004
PU_PELS 0x0008
PU_LOMETRIC 0x000C
PU_HIMETRIC 0x0010
PU_LOENGLISH 0x0014
PU_HIENGLISH 0x0018
PU_TWIPS 0x001C

 

For more information about these types, see volume 2 of the OS/2 Programmer's Reference.

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 (CR/LF) combination to break up pictures in binary format. If they do, the CR/LF combination is treated as literal text and considered part of the picture data.

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

{\pict\wbitmap0\picw170\pich77\wbmbitspixel1\wbmplanes1\wbmwidthbytes22
\picwgoal505
\pichgoal221
\picscalex172
\picscaley172
49f2000000000273023d1101a030
3901000a000000000273023d98
0048000200000275
02040000200010275023e000000000
273023d000002b90002b90002
b90002b90002b9
0002b90002b90002b90002b90002b90002
b92222b90002b90002b90
002b90002b9
0002b90002b90002b90002b9000

Objects

Microsoft OLE links, Microsoft OLE embedded objects, and Macintosh Edition Manager subscriber objects are represented in RTF as objects. Objects are destinations that contain a data part and a result part. The data part is generally hidden to the application that produced the document. A separate application uses the data and supplies the appearance of the data. This appearance is the result part of the object.

The representation of objects in RTF is designed to allow RTF readers that don't understand objects or don't use a particular type of object 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. Each object comes with optional information about the object, a required destination that contains the object data, and an optional result that contains the current appearance of the object. This result contains standard RTF. It is an important responsibility of the RTF writer to provide the result so that existing RTF readers that either do not support objects or that do not support the particular type of object will be able to display the object.

When the object is an OLE embedded or linked object, the data part of the object is the structure produced by the OLESaveToStream 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 extracted from the structure produced by the OLESaveToStream function. For information about the OLESaveToStream function, see the Microsoft Object Linking and Embedding Software Development Kit.

The syntax for this destination is:

<obj> ( '{' \object (<objtype> & <objmod>? & <objclass>? & <objname>? & <objtime>? & <objsize>? & <rsltmod>?) <objdata> <result> '}' ) | <pubobject>
<objtype> \objemb | \objlink | \objautlink | \objsub | \objpub | \objicemb | objhtml | objocx
<objmod> \linkself? & \objlock? | \objupdate?
<objclass> '{\*' \objclass #PCDATA '}'
<objname> '{\*' \objname #PCDATA '}'
<objtime> '{\*' \objtime <time> '}'
<rsltmod> \rsltmerge? & <rslttype>?
<rslttype> \rsltrtf | \rslttxt | \rsltpict | \rsltbmp
<objsize> \objsetsize? & \objalign? & \objtransy? & <objhw>? & \objcropt? & \objcropb? & \objcropl? & \objcropr? & \objscalex? & \objscaley?
<objhw> \objh & \objw
<objdata> '{\*' \objdata (<objalias>? & <objsect>?) <data> '}'
<objalias> '{\*' \objalias <data> '}'
<objsect> '{\*' \objsect <data> '}'
<result> '{' \result <para>+ '}'

 

Control word Meaning

Object Type

\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.
\objpub An object type of Macintosh Edition Manager publisher.
\objicemb An object type of MS Word for the Macintosh Installable Command (IC) Embedder.
\objhtml  
\objocx An object type of OLE control.

Object Information

\linkself The object is a link to another part of the same document.
\objlock Locks the object from any updates.
\objupdate Forces an update to the object before displaying it. Note that this will override any values in the <objsize> control words, but reasonable values should always be provided for these to maintain backwards compatibility.
\objclass The text argument is the object class to use for this object; ignore the class specified in the object data. This is a destination control word.
\objname The text argument is the name of this object. This is a destination control word.
\objtime Describes the time that the object was last updated.

Object Size, Position, Cropping, and Scaling

\objhN N is the original object height in twips, assuming the object has a graphical representation.
\objwN N is the original object width in twips, assuming the object has a graphical representation.
\objsetsize Forces the object server to set the object's dimensions to that specified by the client.
\objalignN N is the distance in twips from the left edge of the objects that should be aligned on a tab stop. This is needed to place Equation Editor equations correctly in line.
\objtransyN N is the distance in twips the objects should be moved vertically with respect to the baseline. This is needed to place Math Type equations correctly in line.
\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

\objdata This subdestination contains the data for the object in the appropriate format; OLE objects are in OLESaveToStream format. This is a destination control word.
\objalias This subdestination contains the alias record for the publisher object for the Macintosh Edition Manager. This is a destination control word.
\objsect This subdestination contains the section record for the publisher object for the Macintosh Edition Manager. This is a destination control word.

Object Result

\rsltrtf Forces the result to be rich text format, if possible.
\rsltpict Forces the result to be a Windows metafile or MacPict image format, 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 destination is optional in the \object destination. It contains the last update of the result of the object. The data of the result destination 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 appearance. This is a destination control word.

 

 

When Word is used as an editor for Mail, the following control word can be emitted. It is not seen in other situations.

Control Word Meaning
\objattph Object attachment placeholder. Used in the RTF stream when Word is started as a mail editor and the message contains attachments. The control word tells where in the text stream the attachment should be placed. It does not define the actual attachment.

 

Macintosh Edition Manager Publisher Objects

Word for the Macintosh writes publisher objects for the Macintosh Edition Manager in terms of bookmarks (see "Bookmarks" on page 41 of this Application Note). The range of publisher objects are marked as bookmarks, so these controls are all used within the \bkmkstart destination. The RTF syntax for a publisher object is:

<pubobject> '{\*' \bkmkstart \bkmkpub \pubauto? (<objalias>? & <objsect>) #PCDATA '}'

 

Control word Meaning
\bkmkpub The bookmark marks a Macintosh Edition Manager publisher object.
\pubauto The publisher object updates all Macintosh Edition Manager subscribers of this object automatically whenever it is edited.

 

Drawing Objects

Word 6.0/95 RTF

Drawing objects and the drawing primitives enumerated within drawing object groups use the syntax described by the following tables.

<do> '{\*' \do <dohead> <dpinfo>'}'
<dohead> <dobx> <doby> <dodhgt> <dolock>?
<dobx> \dobxpage | \dobxcolumn | \dobxmargin
<doby> \dobypage | \dobypara | \dobymargin
<dodhgt> \dodhgt
<dolock> \dolock
<dpinfo> <dpgroup> | <dpcallout> | <dpsimple>
<dpgroup> \dpgroup \dpcount <dphead> <dpinfo>+ \dpendgroup <dphead>
<dpcallout> \dpcallout <cotype> <coangle>? <coaccent>? <cosmartattach>? <cobestfit>? <cominusx>? <cominusy>? <coborder>? <codescent>? \dpcooffset \dpcolength <dphead> <dppolyline> <dphead> <dpprops> <dptextbox> <dphead> <dpprops>
<dpsimple> <dpsimpledpk> <dphead> <dpprops>
<dpsimpledpk> <dpline> | <dprect> | <dptextbox> | <dpellipse> | <dppolyline> | <dparc>
<dpline> \dpline <dppt> <dppt>
<dprect> \dprect (\dproundr)?
<dptextbox> \dptxbx \dptxbxmar '{' \dptxbxtext <para>+'}'
<dpellipse> \dpellipse
<dparc> \dparc \dparcflipx? \dparcflipy?
<dppolyline> \dppolyline (\dppolygon)? \dppolycount <dppt>+
<dppt> \dpptx \dppty
<dphead> \dpx \dpy \dpxsize \dpysize

 

Note that in <dpgroup> the number of <dpinfo>s is equal to the argument of \dpcount, whereas in <dppolyline> the number of <dppt>s is equal to the argument of \dppolycount.

The following elements of the drawing-object syntax pertain specifically to callout objects:

<cotype> \dpcotright | \dpcotsingle | \dpcotdouble | \dpcottriple
<coangle> \dpcoa
<coaccent> \dpcoaccent
<cosmartattach> \dpcosmarta
<cobestfit> \dpcobestfit
<cominusx> \dpcominusx
<cominusy> \dpcominusy
<coborder> \dpcoborder
<codescent> \dpcodtop | \dpcodcenter | \dpcodbottom | \dpcodabs

 

The remaining elements of the drawing object syntax are properties applied to individual drawn primitives:

<dpprops> <lineprops>? <fillprops>? <endstylestart>? <endstyleend>? <shadow>?
<lineprops> <linestyle> <linecolor> \dplinew
<linestyle> \dplinesolid | \dplinehollow | \dplinedash | \dplinedot | \dplinedado | \dplinedadodo
<linecolor> <linegray> | <linergb>
<linegray> \dplinegray
<linergb> \dplinecor \dplinecog \dplinecob<linepal>?
<linepal> \dplinepal
<fillprops> <fillcolorfg> <fillcolorbg> \dpfillpat
<fillcolorfg> <fillfggray> | <fillfgrgb>
<fillfggray> \dpfillfggray
<fillfgrgb> \dpfillfgcr \dpfillfgcg \dpfillfgcb<fillfgpal>?
<fillfgpal> \dpfillfgpal
<fillcolorbg> <fillbggray> | <fillbgrgb>
<fillbggray> \dpfillbggray
<fillbgrgb> \dpfillbgcr \dpfillbgcg \dpfillbgcb<fillbgpal>?
<fillbgpal> \dpfillbgpal
<endstylestart> <arrowstartfill> \dpastartl \dpastartw
<arrowstartfill> \dpastartsol | \dpastarthol
<endstyleend> <arrowendfill> \dpaendl \dpaendw
<arrowendfill> \dpaendsol | \dpaendhol
<shadow> \dpshadow \dpshadx \dpshady

 

The following table describes the control words for the drawing object group in detail. All color values are RGB values between 0-255. All distances are in twips. All other values are as indicated.

Control word Definition
\do Indicates a drawing object is to be inserted at this point in the character stream. This is a destination control word.
\dolock The drawing object's anchor is locked and cannot be moved.
\dobxpage The drawing object is page relative in the x-direction.
\dobxcolumn The drawing object is column relative in the x-direction.
\dobxmargin The drawing object is margin relative in the x-direction.
\dobypage The drawing object is page relative in the y-direction.
\dobypara The drawing object is paragraph relative in the y-direction.
\dobymargin The drawing object is margin relative in the y-direction.
\dodhgtN The drawing object is positioned at the following numeric address in the z-ordering.

Drawing Primitives

\dpgroup Begin group of drawing primitives.
\dpcountN Number of drawing primitives in the current group.
\dpendgroup End group of drawing primitives.
\dparc Arc drawing primitive.
\dpcallout Callout drawing primitive, which consists of both a polyline and a text box.
\dpellipse Ellipse drawing primitive.
\dpline Line drawing primitive.
\dppolygon Polygon drawing primitive (closed polyline).
\dppolyline Polyline drawing primitive.
\dprect Rectangle drawing primitive.
\dptxbx Text box drawing primitive.

Position and Size

\dpxN X-offset of the drawing primitive from its anchor.
\dpxsizeN X-size of the drawing primitive.
\dpyN Y-offset of the drawing primitive from its anchor.
\dpysizeN Y-size of the drawing primitive.

Callouts

\dpcoaN Angle of callout's diagonal line is restricted to one of the following: 0, 30, 45, 60, or 90. If this control word is absent, the callout has an arbitrary angle, indicated by the coordinates of its primitives.
\dpcoaccent Accent bar on callout (vertical bar between polyline and text box).
\dpcobestfit Best fit callout (x-length of each line in callout is similar).
\dpcoborder Visible border on callout text box.
\dpcodabs Absolute distance-attached polyline.
\dpcodbottom Bottom-attached polyline.
\dpcodcenter Center-attached polyline.
\dpcodtop Top-attached callout.
\dpcodescentN The descent of the callout
\dpcolengthN Length of callout.
\dpcominusx Text box falls in quadrants II or III relative to polyline origin.
\dpcominusy Text box falls in quadrants III or IV relative to polyline origin.
\dpcooffsetN Offset of callout. This is the distance between the end of the polyline and the edge of the text box.
\dpcosmarta Auto-attached callout. Polyline will attach to either the top or bottom of the text box depending on the relative quadrant.
\dpcotdouble Double line callout.
\dpcotright Right angle callout.
\dpcotsingle Single line callout.
\dpcottriple Triple line callout.

Text Boxes and Rectangles

\dptxbxmarN Internal margin of the text box.
\dptxbxtext Group that contains the text of the text box.
\dproundr Rectangle is a round rectangle.

Lines and Polylines

\dpptxN X-coordinate of the current vertex (only for lines and polylines). The coordinate order for a point must be x, y.
\dpptyN Y-coordinate of the current vertex (only for lines and polylines). The coordinate order for a point must be x, y.
\dppolycountN Number of vertices in polyline drawing primitive.

Arcs

\dparcflipx This indicates that the end point of the arc is to the right of the start point. Arcs are

drawn counter-clockwise.

\dparcflipy This indicates that the end point of the arc is below the start point. Arcs are drawn counter-clockwise.

Line Style

\dplinecobN Blue value for line color.
\dplinecogN Green value for line color.
\dplinecorN Red value for line color.
\dplinepal Render line color using the PALETTERGB macro instead of the RGB macro in Windows.
\dplinedado Dashed-dotted line style.
\dplinedadodo Dashed-dotted-dotted line style.
\dplinedash Dashed line style.
\dplinedot Dotted line style.
\dplinegrayN Grayscale value for line color (in half-percentages).
\dplinehollow Hollow line style (no line color).
\dplinesolid Solid line style.
\dplinewN Thickness of line (in twips).

Arrow Style

\dpaendhol Hollow end arrow (lines only).
\dpaendlN Length of end arrow, relative to pen width:

1 Small

2 Medium

3 Large

\dpaendsol Solid end arrow (lines only).
\dpaendwN Width of end arrow, relative to pen width:

1 Small

2 Medium

3 Large

\dpastarthol Hollow start arrow (lines only).
\dpastartlN Length of start arrow, relative to pen width:

1 Small

2 Medium

3 Large

\dpastartsol Solid start arrow (lines only).
\dpastartwN Width of start arrow, relative to pen width:

1 Small

2 Medium

3 Large

Fill Pattern

\dpfillbgcbN Blue value for background fill color.
\dpfillbgcgN Green value for background fill color.
\dpfillbgcrN Red value for background fill color.
\dpfillbgpal Render fill background color using the PALETTERGB macro instead of the RGB macro in Windows.
\dpfillbggrayN Grayscale value for background fill (in half-percentages).
\dpfillfgcbN Blue value for foreground fill color.
\dpfillfgcgN Green value for foreground fill color.
\dpfillfgcrN Red value for foreground fill color.
\dpfillfgpal Render fill foreground color using the PALETTERGB macro instead of the RGB macro in Windows.
\dpfillfggrayN Grayscale value for foreground fill (in half-percentages).
\dpfillpatN Index into a list of fill patterns. See below for list.

Shadow

\dpshadow Current drawing primitive has a shadow.
\dpshadxN X-offset of the shadow.
\dpshadyN Y-offset of the shadow.

 

The following values are available for specifying fill patterns in drawing objects with the \dpfillpat control word.

Value Fill pattern
0 Clear (no pattern)
1 Solid (100%)
2 5%
3 10%
4 20%
5 25%
6 30%
7 40%
8 50%
9 60%
10 70%
11 75%
12 80%
13 90%
14 Dark horizontal lines
15 Dark vertical lines
16 Dark left-diagonal lines (\\\)
17 Dark right-diagonal lines (///)
18 Dark grid lines
19 Dark trellis lines
20 Light horizontal lines
21 Light vertical lines
22 Light left-diagonal lines (\\\)
23 Light right-diagonal lines (///)
24 Light grid lines
25 Light trellis lines

 

 

Word 97 RTF for Drawing Objects (Shapes)

 

Basic Format

The basic format for drawing objects in RTF is as follows

{ \shp   ........  { \*\shpinst  { \spp  { \sn .......... }  { \sp .............. }  }  }
            { \shprslt   ............... }   }

The first destination (\shp) is always present. This control word groups everything related to a shape together. Following the destination change, comes basic information regarding the shape. The following keywords with values can appear in any order after the "{ \shp" control word.

 
Control word Meaning

Shape keywords

 
\shpleftN The value N is a measurement in twips. Specifies position of shape from the left of the anchor.
\shptopN The value N is a measurement in twips. Specifies position of shape from top of the anchor.
\shpbottomN The value N is a measurement in twips. Specifies position of shape from bottom of the anchor.
\shprightN The value N is a measurement in twips. Specifies position of shape from right of the anchor.
\shplidN A number that is unique to each shape. This keyword is primarily used for linked text boxes. The value N is a long integer.
\shpzN Describes z-order of shape. It starts at 0 for the back most shape and proceed to N for the top most shape. The shapes that appear inside of the header document will have a separate z-order as compared to the z-order of the shapes in the main document. For instance the back-most shape in the header will have z-order number 0, and the back-most main-document shape will also have z-order number 0.
\shpfhdrN 0 if the shape is in the main document. 1 if the shape is in the header document.
\shpbxpage The shape is positioned relative to the page in the x (horizontal) direction.
\shpbxmargin The shape is positioned relative to the margin in the x (horizontal) direction.
\shpbxcolumn The shape is positioned relative to the column in the x (horizontal) direction.
\shpbypage The shape is positioned relative to the page in the y (vertical) direction.
\shpbymargin The shape is positioned relative to the margin in the y (vertical) direction.
\shpbypara The shape is positioned relative to the paragraph in the y (vertical) direction.
\shpwrN Describes the type of wrap for the shape.

1 Wrap around top and bottom of shape (no text allowed beside shape)

2 Wrap around shape

3 None (wrap as if shape isn't present)

4 Wrap tightly around shape

5 Wrap text through shape

\shpwrkN Wrap on side (for types 2 and 4 for \shpwrN ).

0 Wrap both sides of shape

1 Wrap left side only

2 Wrap right side only

3 Wrap only on largest side

\shpfblwtxtN Describes relative z-ordering.

0 Text is below shape

1 Shape is below text

\shplockanchor Lock anchor for shape.
\shptxt Text for a shape. The text must come after all the other properties for the shape (inside the \shpinst destination) in the following format:
{ \shptxt  Any Valid RTF for the current textbox }

Note For linked text boxes, the first text box of the linked set has the entire story, so all following text boxes will not have a \shptxt field.

\shprslt This is where the Word 6.0/95 drawn object RTF can be placed.
\shpgrp Specifies a group shape. The parameters following this keyword are the same as those following \shp. The order of the shapes inside a group is from bottom to top in z-order.

Inside of a \shpgrp, no { \shprslt .... } fields would be generated (that is, only the root-level shape can have a \shprslt field (this field describes the entire group). For example:

{ \shpgrp  ....... { \shp ..... (and all sub-items as usual) }
	           { \shp ......(and all sub-items as usual) }

Note A { \shpgrp ...... } can be substituted for a { \shp ..... } at any place (to accomplish groups inside of groups).

 

With the exception of \shplid, these do not apply for shapes that are within a group. For more information about groups, see the "Introduction" section of this Applicaiton Note.

Control word Meaning
\background Specifies the document background. This is a destination keyword. It contains the { \shp keyword and all the shape properties.

Drawing Object Properties

The { \shp ............ control word is followed by { \*\shpinst

The bulk of a shape is defined as a series of properties. Following the { \*\shpinst is a list of all the properties of a shape each in the following format:

{ \sp  { \sn PropertyName } { \sv PropertyValueInformation } }

 

The control word for the drawing object property is \sp. Each property has a pair of name (\sn) and value (\sv) control words placed in the shape property group. For example, the vertical flip property is represented as:

{\sp{\sn fFlipV}{\sv 1}}

 

Here, the name of the property is fFlipV and the value is 1, which indicates True. All shape properties follow this basic format. Only properties that have been explicitly set for a shape are written out in RTF format. Other properties assume the default values (a property may be set to the default value explicitly).

The following table describes all the names of properties for drawing objects along with the type of their corresponding value.

Property Type of Value Meaning

Object Type

   
Rotation Angle Rotation of the shape.
FFlipV Boolean Vertical flip, applied after the rotation.
FFlipH Boolean Horizontal flip, applied after the rotation.
ShapeType   See below for values. 0 indicates user-drawn freeforms and polygons.
WzName String Shape name (only set through Visual Basic® for Applications).
pWrapPolygonVertices Array Points of the text wrap polygon.
dxWrapDistLeft EMU Left wrapping distance from text.
dyWrapDistTop EMU Top wrapping distance from text.
dxWrapDistRight EMU Right wrapping distance from text.
dyWrapDistBottom EMU Bottom wrapping distance from text.
fBehindDocument Boolean Place the shape behind text.
fIsButton Boolean Specified whether the shape is a button.
fHidden Boolean Do not display or print (only set through Visual Basic for Applications).

Lock

   
fLockRotation Boolean Lock rotation.
fLockAspectRatio Boolean Lock aspect ratio.
fLockAgainstSelect Boolean No selecting this shape.
fLockCropping Boolean No cropping this shape.
fLockVerticies Boolean No points edit mode.
fLockText Boolean Do not edit text.
fLockAdjustHandles Boolean Do not adjust.
fLockAgainstGrouping Boolean Do not group this shape.

Text Box

   
dxTextLeft EMU Left internal margin of the text box.
dyTextTop EMU Top internal margin of the text box.
dxTextRight EMU Right internal margin of the text box.
dyTextBottom EMU Bottom internal margin of the text box.
WrapText   Wrap text at shape margins:

0 Square

1 Tight

2 None

3 Top Bottom

4 Through

anchorText   Text anchor point:

0 Top

1 Middle

2 Bottom

3 Top Centered

4 Middle Centered

5 Bottom Centered

6 Bottom Centered Baseline

txflTextFlow   Text flow:

0 Horizontal non-ASCII font

1 Top to bottom ASCII font

2 Bottom to top non-ASCII font

3 Top to bottom non-ASCII font

4 Horizontal ASCII font

WordArt Effect

   
gtextUNICODE String Unicode text string.
gtextAlign   Alignment on curve:

0 Stretch each line of text to fit width

1 Center text on width

2 Left justify

3 Right justify

4 Spread letters out to fit width

5 Spread words out to fit width

gtextSize Fixed Default point size.
gtextSpacing Fixed Adjust the spacing between characters (1.0 is normal).
gtextFont String Font name.
fGtext Boolean True if the text effect properties (gtext*) are used.

False if these properties are ignored.

gtextFVertical Boolean If an @ font is available use it; otherwise, rotate individual characters 90 degrees counter-clockwise.
gtextFKern Boolean If the font supports character pair kerning, use it.
gtextFTight Boolean Adjust the spacing between characters rather than the character advance by the gtextSpacingratio.
gtextFStretch Boolean Stretch the text to fit shape.
gtextFShrinkFit Boolean When laying out the characters, consider the glyph bounding box rather than the nominal font character bounds.
gtextFBestFit Boolean Scale text laid out on a path to fit the path.
gtextFNormalize Boolean Stretch individual character heights independently to fit.
gtextFDxMeasure Boolean When laying out characters, measure distances along the x-axis rather than along the path.
gtextFBold Boolean Bold font (if available).
gtextFItalic Boolean Italic font (if available).
gtextFUnderline Boolean Underline font (if available).
gtextFShadow Boolean Shadow font (if available).
gtextFSmallcaps Boolean Small caps font (if available).
gtextFStrikethrough Boolean Strikethrough font (if available).

Picture

   
cropFromTop Fixed Top cropping percentage.
cropFromBottom Fixed Bottom cropping percentage.
cropFromLeft Fixed Left cropping percentage.
cropFromRight Fixed Right cropping percentage.
pib Picture Binary picture data.
pibName String Picture file name for link to file pictures.
pibFlags   Flags for linked to file pictures:

0 No links (default)

10 Link to file; save with document

14 Link to file; do not save picture with document

pictureTransparent Color Transparent color.
pictureContrast Fixed Contrast setting.
PictureBrightness Fixed Brightness setting.
pictureGamma Fixed Gamma correction setting.
pictureGray Boolean Display grayscale.
pictureBiLevel Boolean Display bi-level.

Geometry

   
geoLeft Long integer Left edge of the bounds of a user-drawn shape.
geoTop Long integer Top edge of the bounds of a user-drawn shape.
geoRight Long integer Right edge of the bounds of a user-drawn shape.
geoBottom Long integer Bottom edge of the bounds of a user-drawn shape.
pVerticies Array The points of the shape.
pSegmentInfo Array The segment information.
adjustValue Integer First adjust value from an adjust handle. The interpretation varies with the shape type. Adjust values alter the geometry of the shape in smart ways.
adjust2Value Integer Second adjust value.
adjust3Value Integer Third adjust value.
adjust4Value Integer Fourth adjust value.
adjust5Value Integer Fifth adjust value.
adjust6Value Integer Sixth adjust value.
adjust7Value Integer Seventh adjust value.
adjust8Value Integer Eighth adjust value.
adjust9Value Integer Ninth adjust value.
adjust10Value Integer Tenth adjust value.

Fill

   
fillType Fill type Type of fill:

0 A solid color

1 A pattern (bitmap)

2 A texture (pattern with its own color map)

3 A picture centered in the shape

4 Shade from start to end points

5 Shade from bounding rectangle to end point

6 Shade from shape outline to end point

7 Shade using the fillAngle

fillColor Color Foreground color.
fillOpacity Fixed Opacity. Normal is 1.0.
fillBackColor Color Background color.
fillBackOpacity Fixed Opacity for shades only. Normal is 1.0.
fillBlip Picture Pattern/texture picture for the fill.
fillBlipName String Picture file name for custom fills.
fillblipflags   Flags for fills:

0 No links (default)

10 Link to file; save with document

14 Link to file; do not save picture with document

fillWidth EMU The pattern or tile will be expanded to approximately this size.
fillHeight EMU The pattern or tile will be expanded to approximately this size.
fillAngle Fixed Fade angle number of degrees.
fillFocus   Linear shaded fill focus percent.
fillToLeft Fixed The fillToLeft, fillToTop, fillToRight, and fillToBottom values define the "focus" rectangle for concentric shapes; they are specified as a fraction of the outer rectangle of the shade.
fillToTop Fixed See fillToLeft definition.
fillToRight Fixed See fillToLeft definition.
fillToBottom Fixed See fillToLeft definition.
fillShadeColors Array Custom or preset color ramps for graduated fills on shapes.
fillOriginX Fixed When a textured fill is used, the texture may be aligned to with shape (fFillShape)--if this is done, the default alignment is to the top left. The values

FillOriginY

FillShapeOriginX

fillShapeOriginY

allow an arbitrary position in the texture (relative to the top-left proportion of the texture's height and width) to be aligned on an arbitrary position on the shape (relative to the top-left proportion of the width and height of the bounding box).

Note that all these values are fixed point fractions of the relevant width or height.

fillOriginY Fixed See fillOriginX definition.
fillShapeOriginX Fixed See fillOriginX definition.
fillShapeOriginY Fixed See fillOriginX definition.
fFilled Boolean The shape is filled.

Line

   
lineColor Color Color of the line.
lineBackColor Color Background color of the pattern.
lineType Line type Type of line:

0 Solid fill with the line color

1 Patterned fill with the lineFillBlip

2 Textured fill with the lineFillBlip

3 Picture fill with the lineFillBlip

lineFillBlip Picture Pattern for the line.
lineblipflags   Flags for patterned lines:

0 No links (default)

10 Link to file; save with document

14 Link to file; do not save picture with document

lineFillWidth EMU Width of the pattern
lineFillHeight EMU Height of the pattern
lineWidth EMU Line width
lineStyle   Line style:

0 Single line (of width lineWidth)

1 Double lines of equal width

2 Double lines, one thick, one thin

3 Double lines, reverse order

4 Three lines, thin, thick, thin

lineDashing   Dashing:

0 Solid

1 Dash (Windows)

2 Dot (Windows)

3 Dash dot (Windows)

4 Dash dot dot (Windows)

6 Dot

7 Dash

8 Long dash

9 Dash dot

10 Long dash dot

11 Long dash dot dot

lineStartArrowhead   Start arrow type:

0 Nothing

1 Arrow

2 Stealth arrow

3 Diamond

4 Oval

6 Open arrow

7 Chevron arrow

8 Double chevron arrow

lineEndArrowhead   End arrow type (same values as for lineStartArrowhead).
lineStartArrowWidth   Start arrow width:

0 Narrow

1 Medium

2 Wide

lineStartArrowLength   Start arrow length:

0 Short

1 Medium

2 Long

lineEndArrowWidth   End arrow width (same values as for lineStartArrowWidth).
lineEndArrowLength   End arrow length (same values as for lineStartArrowLength).
fLine Boolean Has a line.

Shadow

   
shadowType   Type of shadow:

0 Offset shadow

1 Double offset shadow

2 Rich perspective shadow (cast relative to shape)

3 Rich perspective shadow (cast in shape space)

4 Perspective shadow cast in drawing space

6 Emboss or engrave

shadowColor Color Foreground color.
shadowHighlight Color Embossed color.
shadowOpacity Fixed Opacity of the shadow. Normal is 1.0.
shadowOffsetX EMU Shadow offset toward the right.
shadowOffsetY EMU Shadow offset toward the bottom.
shadowSecondOffsetX EMU Double shadow offset toward the right.
shadowSecondOffsetY EMU Double shadow offset toward the bottom.
shadowScaleXToX Fixed The shadowScaleXToX to shadowWeight define a 3x2 transform matrix that is applied to the shape to generate the shadow.
shadowScaleYToX Fixed See definition for shadowScaleXToX.
shadowScaleXToY Fixed See definition for shadowScaleXToX.
shadowScaleYToY Fixed See definition for shadowScaleXToX.
shadowPerspectiveX Fixed See definition for shadowScaleXToX.
shadowPerspectiveY Fixed See definition for shadowScaleXToX.
shadowWeight Fixed See definition for shadowScaleXToX.
shadowOriginX Fixed Define the position of the origin relative to the center of the shape-- this position is determined based on a proportion of the rotated shape width and height. The shape will be rotated and then positioned such that the point is at (0,0) before the transformation is applied.
ShadowOriginY Fixed See the definition for shadowOriginX.
fShadow Boolean Switches the shadow on or off.

3-D Effects

   
c3DSpecularAmt Fixed Specular amount for the material.
c3DDiffuseAmt Fixed Diffusion amount for the material.
c3DShininess Fixed Shininess of the material.
c3DEdgeThickness EMU Specular edge thickness.
c3DExtrudeForward EMU Extrusion amount forward.
c3DExtrudeBackward EMU Extrusion amount backward.
c3DExtrusionColor Color Color of the extrusion.
f3D Boolean True if shape has a three-dimensional (3D) effect, False if it does not.
fc3DMetallic Boolean True if shape uses metallic specularity, False if it does not.
fc3DUseExtrusionColor Boolean Extrusion color is set explicitly.
fc3DLightFace Boolean Light the face of the shape.
c3DYRotationAngle Angle Degrees about y-axis.

If fc3DconstrainRotation (a Boolean property which defaults to True) is True the rotation is restricted to x-y rotation and the final rotation results from first rotating by c3DYRotationAngle degrees about the y-axis and then by c3DXRotationAngle degrees about the z-axis.

If fc3DconstrainRotation is False, the final rotation results from a single rotation of c3DrotationAngle about the axis specified by c3DrotationAxisX, c3DrotationAxisY, and c3DrotationAxisZ.

c3DXRotationAngle Angle Degrees about x-axis.
c3DRotationAxisX Long integer These specify the rotation axis. Only their relative magnitudes matter.
c3DRotationAxisY Long integer See the c3DYRotationAxisX definition.
c3DRotationAxisZ Long integer See the c3DYRotationAxisX definition.
c3DRotationAngle Angle The rotation about the axis (defined above in the c3DRotationAxisX, Y, and Z parameter sections)
fC3DRotationCenterAut Boolean If fC3DRotationCenterAuto is True the rotation will be about the center of the 3-D bounding cube of the 3-D group; otherwise, the rotation center will be about c3DRotationCenterX, c3DRotationCenterY, and c3DRotationCenterZ.
c3DRotationCenterX Fixed Rotation center (X).

The X and Y values are a 16.16 fraction of the geometry width and height, with (0,0) being at the center of the geometry. The Z value must be in absolute units (EMUs).

c3DRotationCenterY Fixed Rotation center (Y).

If fC3DRotationCenterAuto is True the rotation will be about the center of the 3-D bounding cube of the 3-D group; otherwise, the rotation center will be about c3DRotationCenterX, c3DRotationCenterY, and c3DRotationCenterZ.

The X values and Y values are a fraction of the geometry width and height, with (0,0) being at the center of the geometry. The Z value is in absolute units.

c3DRotationCenterZ EMU See c3DRotationCenterY above.
c3DRenderMode Long Integer 0 Render with full detail

1 Render as a wire frame

2 Render a bounding cube

c3DXViewpoint EMU X view point.
c3DYViewpoint EMU Y view point.
c3DZViewpoint EMU Z view distance.
c3DOriginX Fixed The following c3DOriginY and c3DSkewAngle values define the origin relative to which the viewpoint origin is measured.

These values are 16.16 numbers that specify the position of the origin within the shape bounding box as multiples of the width and height of that bounding box and relative to the center (that is, they are displaced from the center). When these values are applied, the actual transformed shape path is used rather than the shape geometry (compare with the shadow and perspective values which necessarily work on the geometry bounding box not the actual points). This means that a shape that extends outside the geometry bounding box (such as a text effect) is handled "correctly" for the calculation of the 3-D origin.

c3DOriginY Fixed See the definition for c3DOriginX.
c3DSkewAngle Fixed Skew angle.
c3DSkewAmount Fixed Percentage skew amount.
c3DAmbientIntensity Fixed Ambient intensity should be low (0 to .1) to avoid washed out appearance.
c3DKeyX Long integer Key light source direction. Values may be any number; only their relative magnitudes matter.
c3DKeyY Long integer See c3DKeyX definition above.
c3DKeyZ Long integer See c3DKeyX definition above.
c3DKeyIntensity Fixed Fixed point intensity. Theoretical maximum is 1, but can be higher.
c3DFillX Long integer Fill light source direction; only their relative magnitudes matter. This direction defines a second light source arbitrarily called the "fill light." Generally this will be positioned 90-180 degrees away from the key light and very roughly in front of the scene to fill in any harsh shadows. This fill will be dim compared to the first light source. Theoretically it should be non-harsh, but harsh fill lighting looks better sometimes.
c3DFillY Long integer See c3DfillX definition.
c3DFillZ Long integer See c3DfillX definition.
c3DFillIntensity Fixed Theoretical maximum is 1, but can be higher.
fc3DParallel Boolean True if the fill has parallel projection, False if it does not. If fc3DParallel is True, the fc3DKeyHarsh and fc3DFillHarsh properties determine the parallel projection used. A skew amount of 0 means the projection is orthographic.
fc3DKeyHarsh Boolean True if key lighting is harsh, False if it is not.
fc3DFillHarsh Boolean True if fill lighting harsh, False if it is not.

Callout

   
spcot   Callout type:

1 Right angle

2 One segment

3 Two segments

4 Three segments

dxyCalloutGap EMU Distance from box to first point.
spcoa   Callout angle:

1 Any angle

2 30 degrees

3 43 degrees

4 60 degrees

5 90 degrees

spcod   Callout drop type:

0 Top

1 Center

2 Bottom

3 Specified by dxyCalloutDropSpecified

dxyCalloutDropSpecified EMU If spcod is 3, then this holds the actual drop distance.
dxyCalloutLengthSpecified EMU In the case where fCalloutLengthSpecified is True, this holds the actual distance.
fCallout Boolean This is a callout.
fCalloutAccentBar Boolean Callout has an accent bar.
fCalloutTextBorder Boolean Callout has a text border.
fCalloutDropAuto Boolean True if Auto attach is on. False if it is off. If this is True, then the converter should occasionally invert the drop distance.
fCalloutLengthSpecified Boolean True if the callout length is specified; False if it is not. If True, use dxyCalloutLengthSpecified. If False, the Best Fit option is on.

 

The format of the value depends on the property name it is paired with. Many values are simple single numbers. Distances are expressed in EMU units. There are 12700 EMU units in a point hence 914400 in an inch and 360000cm-1. Fractional or fixed values are expressed using units that are 1/65536th of a whole. Angles are expressed as fractions of a degree. Colors are 24 bit color values. Booleans have two possible values: 1 for True and 0 for False.

Arrays are formatted as a sequence of number separated by semicolons. The first number tells the size of each element in the array in bytes. The number of bytes per element may be 2, 4, or 8. When the size of the element is 8, each element is represented as a group of two numbers. The second number tells the number of elements in the array. For example, the points of a square polygon are written as:

{sv 8;4;{0,0};{100,0};{100,100};{0,100}}

The ShapeType property can have the following possible values.

Value Description
0 Freeform or non-autoshape
1 Rectangle
2 Round rectangle
3 Ellipse
4 Diamond
5 Isosceles triangle
6 Right triangle
7 Parallelogram
8 Trapezoid
9 Hexagon
10 Octagon
11 Plus Sign
12 Star
13 Arrow
14 Thick arrow
15 Home plate
16 Cube
17 Balloon
18 Seal
19 Arc
20 Line
21 Plaque
22 Can
23 Donut
24 Text simple
25 Text octagon
26 Text hexagon
27 Text curve
28 Text wave
29 Text ring
30 Text on curve
31 Text on ring
41 Callout 1
42 Callout 2
43 Callout 3
44 Accent Callout 1
45 Accent Callout 2
46 Accent Callout 3
47 Border Callout 1
48 Border Callout 2
49 Border Callout 3
50 Accent Border Callout 1
51 Accent Border Callout 2
52 Accent Border Callout 3
53 Ribbon
54 Ribbon2
55 Chevron
56 Pentagon
57 No Smoking
58 Seal8
59 Seal16
60 Seal32
61 Wedge Rect Callout
62 Wedge RRect Callout
63 Wedge Ellipse Callout
64 Wave
65 Folded Corner
66 Left Arrow
67 Down Arrow
68 Up Arrow
69 Left Right Arrow
70 Up Down Arrow
71 IrregularSeal1
72 IrregularSeal2
73 Lightning Bolt
74 Heart
75 Picture Frame
76 Quad Arrow
77 Left Arrow Callout
78 Right Arrow Callout
79 Up Arrow Callout
80 Down Arrow Callout
81 Left Right Arrow Callout
82 Up Down Arrow Callout
83 Quad Arrow Callout
84 Bevel
85 Left Bracket
86 Right Bracket
87 Left Brace
88 Right Brace
89 Left Up Arrow
90 Bent Up Arrow
91 Bent Arrow
92 Seal24
93 Striped Right Arrow
94 Notched Right Arrow
95 Block Arc
96 Smiley Face
97 Vertical Scroll
98 Horizontal Scroll
99 Circular Arrow
100 Notched Circular Arrow
101 Uturn Arrow
102 Curved Right Arrow
103 Curved Left Arrow
104 Curved Up Arrow
105 Curved Down Arrow
106 Cloud Callout
107 Ellipse Ribbon
108 Ellipse Ribbon 2
109 Flow Chart Process
110 Flow Chart Decision
111 Flow Chart Input Output
112 Flow Chart Predefined Process
113 Flow Chart Internal Storage
114 Flow Chart Document
115 Flow Chart Multidocument
116 Flow Chart Terminator
117 Flow Chart Preparation
118 Flow Chart Manual Input
119 Flow Chart Manual Operation
120 Flow Chart Connector
121 Flow Chart Punched Card
122 Flow Chart Punched Tape
123 Flow Chart Summing Junction
124 Flow Chart Or
125 Flow Chart Collate
126 Flow Chart Sort
127 Flow Chart extract
128 Flow Chart Merge
129 Flow Chart Offline Storage
130 Flow Chart Online Storage
131 Flow Chart Magnetic Tape
132 Flow Chart Magnetic Disk
133 Flow Chart Magnetic Drum
134 Flow Chart Display
135 Flow Chart Delay
136 Text Plain Text
137 Text Stop
138 Text Triangle
139 Text Triangle Inverted
140 Text Chevron
141 Text Chevron Inverted
142 Text Ring Inside
143 Text Ring Outside
144 Text Arch Up Curve
145 Text Arch Down Curve
146 Text Circle Curve
147 Text Button Curve
148 Text Arch Up Pour
149 Text Arch Down Pour
150 Text Circle Pour
151 Text Button Pour
152 Text Curve Up
153 Text Curve Down
154 Text Cascade Up
155 Text Cascade Down
156 Text Wave1
157 Text Wave2
158 Text Wave3
159 Text Wave4
160 Text Inflate
161 Text Deflate
162 Text Inflate Bottom
163 Text Deflate Bottom
164 Text Inflate Top
165 Text Deflate Top
166 Text Deflate Inflate
167 Text Deflate Inflate Deflate
168 Text Fade Right
169 Text Fade Left
170 Text Fade Up
171 Text Fade Down
172 Text Slant Up
173 Text Slant Down
174 Text Can Up
175 Text Can Down
176 Flow Chart Alternate Process
177 Flow Chart Off-Page Connector
178 Callout 90
179 Accent Callout 90
180 Border Callout 90
181 Accent Border Callout 90
182 Left Right Up Arrow
183 Sun
184 Moon
185 Bracket Pair
186 Brace Pair
187 Seal4
188 Double Wave
201 Host Control
202 Text Box

 

 

The following keywords are related to defining a hyperlink hanging off of a shape (that is, all of them are inside of a {\sp {\sn ... } {\sp ...}}). These specifically can occur in the \sp to define a property that is a hyperlink. They are used like this:

{ \hl  { \hlloc  RTF-string } { \hlsrc RTF-string } { \hlfr RTF-string } }

The three groups can be in any order. These provide the three strings needed to describe a hyperlink fully.

Control word Meaning

Hyperlink property for shapes

\hlloc Location string for hyperlink.
\hlsrc Source string for hyperlink.
\hlfr Friendly name for hyperlink.

 

Footnotes

The \footnote control word introduces a footnote. Footnotes are destinations in RTF. A footnote is anchored to the character that immediately precedes the footnote destination (that is, the footnote moves with the character to which it is anchored). If automatic footnote numbering is defined, the destination can be preceded by a footnote reference character, identified by the control word \chftn. No Microsoft product supports footnotes within headers, footers, or comments (annotations). Placing a footnote within headers, footers, or comments (annotations) will often result in a corrupted document.

Footnotes have the following syntax.

<foot> '{' \footnote <para>+ '}'

Here is an example of a destination 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 this chapter.}
this period was a turning point for Margaret Mead.}
\par

To indicate endnotes, the following combination is emitted: \footnote\ftnalt. Existing readers will ignore the \ftnalt control word and treat everything as a footnote.

For other control words relating to footnotes, see the sections titled "Document Formatting Properties" (page 16), "Section Formatting Properties" (page 20), and "Special Characters" (page 38) in this Application Note.

Comments (Annotations)

RTF comments (annotations) have two parts; the author ID (introduced by the control word \atnid) and the annotation text (introduced by the control word \annotation); there is no group enclosing both parts. No Microsoft product supports comments (annotations) within headers, footers, or footnotes. Placing an annotation within headers, footers, or footnotes will often result in a corrupted document. Each part of the annotation is an RTF destination. Comments (annotations) are anchored to the character that immediately precedes the annotation.

If an annotation is associated with an annotation bookmark, the following two destination control words precede and follow the bookmark. The alphanumeric string N, such as a long integer, represents the bookmark name.

<atrfstart> '{\*' \atrfstart N '}'
<atrfend> '{\*' \atrfend N '}'

 

Comments (annotations) have the following syntax:

<annot> <annotid> <atnauthor> <atntime>? \chatn <atnicn>? <annotdef>
<annotid> '{\*' \atnid #PCDATA '}'
<atnauthor> '{\*' \atnauthor #PCDATA '}'
<annotdef> '{\*' \annotation <atnref> <para>+ '}'
<atnref> '{\*' \atnref N '}'
<atntime> '{\*' \atntime <time> '}'
<atnicn> '{\*' \atnicn <pict> '}'

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.}}

Comments (annotations) may have optional time stamps (contained in the \atntime destination) or icons (contained in the \atnicn destination).

Fields

The \field control word introduces a field destination, which contains the text of fields. Fields have the following syntax:

<field> '{' \field <fieldmod>? <fieldinst> <fieldrslt> '}'
<fieldmod> \flddirty? & \fldedit? & \fldlock? & \fldpriv?
<fieldinst> '{\*' \fldinst <para>+ <fldalt>? '}'
<fldalt> \fldalt
<fieldrslt> '{' \fldrslt <para>+ '}'

 

There are several control words that alter the interpretation of the field. These control words are listed in the following table.

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

 

Two subdestinations are required within the \field destination. They must be enclosed in braces ({ }) and begin with the following control words.

Control word Meaning
\fldinst Field instructions. This is a destination control word.
\fldrslt Most recent calculated result of the field. This is a destination control word.

 

If the instruction for a field contains a file name, then the \cpg control can be used to define the character set of the file name. See "Code Page Support" on page 9 of this Application Note for details.

The \fldrslt control word should be included even if no result has been calculated because most readers (even those readers that do not recognize fields) can generally include the value of the \fldrslt destination in the document. A field result should not start with a table, because this will break some RTF readers.

An example of some field text follows:

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

You can use the \fldalt control word to specify that the given field reference is to an endnote. For example, the following field in RTF is a reference to a footnote

{\field{\*\fldinst NOTEREF _RefNumber } {\fldrslt 1}}

The following is an example of a reference to an endnote

{\field{\*\fldinst NOTEREF _RefNumber \fldalt } {\fldrslt I}}

If the specified field is a form field, the \*\datafield destination appears as a part of <char> and contains the binary data of a form field instruction. For example:

{\field{\*\fldinst {\*\bkmkstart Text1} FORMTEXT
 {{\*\datafield 
00000000000000000554657874310008476565207768697a0000000000000000000000}}}
{\fldrslt Default Result}}
{\*\bkmkend Text1}

Note that the \datafield destination requires the \* prefix. The \fldtype, \date, \time, and \wpeqn field keywords should be ignored.

Form Fields

Control word Meaning
\formfield Group destination keyword indicating start of form field data.
\fftypeN Form field type:

0 Text

1 Check box

2 List

\ffownhelpN 1 if there is associated Help text (defined under \ffhelptext), 0 otherwise.
\ffownstatN 1 if there is associated status line text (defined under \ffstattext), 0 otherwise.
\ffprotN 1 if this field is protected, 0 otherwise.
\ffsizeN Type of size selected for check box field:

0 Auto

1 Exact

\fftypetxtN Type of text field:

0 Regular text

1 Number

2 Date

3 Current date

4 Current time

5 Calculation

\ffrecalcN 1 if the field should be calculated on exit, 0 otherwise.
\ffhaslistboxN 1 if this field has list box attached to it, 0 otherwise.
\ffmaxlen Number of characters for text field.
\ffhpsN Check box size (half-point sizes).
\ffname Form field name (string). This is a destination control word.
\ffdeftext Default text for text field (string). This is a destination control word.
\ffdefres Default entry for list field (for example 0 = first list item, 1 = second list item).
\ffformat Format for text field (string). This is a destination control word.
\ffhelptext Help text (string). This is a destination control word.
\ffstattext Status line text (string). This is a destination control word.
\ffentrymcr Macro to be executed upon entry into this form field (string). This is a destination control word.
\ffexitmcr Macro to be executed upon exit from this form field (string). This is a destination control word.
\ffl List of text for list field. This is a destination control word.
\ffresN Result field for a form field. Values from 0 to N-1, where N is the number of \ffl entries.

 

Index Entries

The \xe control word introduces an index entry. Index entries in RTF are destinations. An index entry has the following syntax:

<idx> '{' \xe (\xef? & \bxe? & \ixe?) <char>+ (<txe> | <rxe>)? '}'
<txe> '{' \txe <char>+ '}'
<rxe> '{' \rxe #PCDATA '}'

 

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 34 of this Application Note. Similarly, the text of the \txe subdestination, described later in this section, becomes part of the document if it is not formatted as hidden text.

The following control words may also be used.

Control word Meaning
\xefN Allows multiple indexes within the same document. N is an integer that corresponds to the ASCII value of a letter between A and Z.
\bxe Formats the page number or cross-reference in bold.
\ixe Formats the page number or cross-reference in italic.
\txe Text Text argument to be used instead of a page number. This is a destination control word.
\rxe BookmarkName Text argument is a bookmark for the range of page numbers. This is a destination control word.

 

Table of Contents Entries

The \tc control word introduces a table of contents entry, which can be used to build the actual table of contents. The \tcn control word marks a table of contents entry that will not have a page number associated with it; this is used in place of \tc for such entries. Table of contents entries are destinations, and they have the following syntax:

<toc> '{' \tc | \tcn (\tcf? & \tcl?) <char>+ '}'

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 destination.

Control word Meaning
\tcfN 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, used for tables of contents).
\tclN Level number (the default is 1).

 

Bidirectional Language Support

RTF supports bidirectional writing orders for languages such as Arabic. The controls are described below (as well as in the appropriate sections throughout this Application Note). Also refer to the associated character properties defined in "Associated Character Properties" on page 37 of this Application Note.

All the control words relating to bidirectional language support are repeated here for convenience.

Control word Meaning
\rtlch The character data following this control word will be treated as a right-to-left run.
\ltrch The character data following this control word will be treated as a left-to-right run (the default).
\rtlmark The following characters should be displayed from right to left.
\ltrmark The following characters should be displayed from left to right.
\rtlpar Text in this paragraph will be displayed with right-to-left precedence
\ltrpar Text in this paragraph will be displayed with left-to-right precedence (the default).
\rtlrow Cells in this table row will have right-to-left precedence.
\ltrrow Cells in this table row will have left-to-right precedence (the default).
\rtlsect This section will thread columns from right to left.
\ltrsect This section will thread columns from left to right (the default).
\rtldoc Text in this document will be displayed from right to left unless overridden by a more specific control.
\ltrdoc Text in this document will be displayed from left to right unless overridden by a more specific control (the default).
\zwj Zero-width joiner. This is used for ligating characters.
\zwnj Zero-width nonjoiner. This is used for unligating characters.
Free Web Hosting