Rich-Text Format Specification V. 2 Introduction 2 rtf syntax 2 Conventions of an rtf reader 4



Download 1.09 Mb.
Page7/15
Date conversion29.04.2016
Size1.09 Mb.
1   2   3   4   5   6   7   8   9   10   ...   15

Character Text


Character text has the following syntax:


| | '{' '}'






(* + )+



#PCDATA | |
| | | | | | | |



Character-Formatting Properties


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

The character-formatting control words are listed in the following table:



Control word

Meaning

\ plain

Reset character-formatting properties to a default value defined by the application. The associated character formatting properties (described in the section "Associated Character Properties") are also reset.

\ b

Bold*

\ caps

All capitals*

\ deleted

Marks the text as deletion revision marked*

\ dnN

Subscript position in half-points (default is 6)

\ 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 (default is 0)

\ expndtwN

Expansion or compression of the space between characters in twips; a negative value compresses. For backwards 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

\ fsN

Font size in half-points (default is 24)

\ i

Italic*

\ outl

Outline*

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

\ scaps

Small capitals*

\ shad

Shadow*

\ strike

Strikethrough*

\ ul

Continuous underline. \ ul0 turns off all underlining

\ uld

Dotted underline

\ uldb

Double underline

\ ulnone

Stops all underlining

\ ulw

Word underline

\ upN

Superscript position in half-points (default is 6)

\ super

Superscripts text and shrinks point size according to font information.

\ v

Hidden text*

\ cfN

Foreground color (default is 0)

\ cbN

Background color (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. This is the default.

\ csN

Designates character style; if a character style is specified, style properties must be specified with the character run.

\ cchsN

Indicates any characters not belonging to the default document character set and 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 keyword.

\ langN

Applies a language to a character. N is a number corresponding to a language. A \ plain 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 (Aus.)

0x0c09

English (UK)

0x0809

English (US)

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

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


1   2   3   4   5   6   7   8   9   10   ...   15


The database is protected by copyright ©essaydocs.org 2016
send message

    Main page