Character formatting words change the look of the text that follows them, up to the end of the group or until they are changed again. Text, with its formatting, can hold special characters, pictures, objects, drawing objects, footnotes, annotations, fields, index and contents entries and bookmarks.
<char> = <ptext> | <atext> | '{' <char> '}'
<ptext> = (<chrfmt>* <data>+)+
<data> = #PCDATA | <spec> | <pict> | <obj> | <do> | <foot> | <annot> | <field> | <idx> | <toc> | <book>
Words marked toggle are turned off with 0: \b starts bold and
\b0 ends it. Special characters are listed with the
syntax.
Character formatting
| Control word | Meaning |
|---|---|
\plain | Reset character formatting, and the associated properties, to the application’s defaults: no bold, italic or underline, 12-point text, the language of \deflang. |
\fN | Font: entry N of the font table. |
\fsN | Font size in half-points (default 24, 12 points). |
\csN | Character style N; its formatting must also be written out. |
\b | Bold. Toggle. |
\i | Italic. Toggle. |
\caps | All capitals. Toggle. |
\scaps | Small capitals. Toggle. |
\outl | Outline. Toggle. |
\shad | Shadow. Toggle. |
\embo | Emboss. |
\impr | Engrave (imprint). |
\strike | Strikethrough. Toggle. |
\striked1 | Double strikethrough; \striked0 turns it off. |
\v | Hidden text. Toggle. |
\webhidden | Hidden in Word 2000’s Web view and not written when saving as a web page. |
\cfN | Text colour (colour table index; default 0). |
\cbN | Background colour (colour table index; default 0). |
\super | Superscript, with a smaller size taken from the font. |
\sub | Subscript, with a smaller size taken from the font. |
\nosupersub | End superscript or subscript. |
\upN | Raise the text by N half-points without changing its size (default 6). |
\dnN | Lower the text by N half-points (default 6). |
\expndN | Space between characters, in quarter-points; negative condenses (default 0). |
\expndtwN | Space between characters in twips; write both this and \expnd. |
\charscalexN | Character width as a percentage (default 100). |
\kerningN | Kern character pairs at and above this size in half-points; 0 turns kerning off. |
\fittextN | Fit the text of the group into N twips. −1 continues the previous run: {\fittext1000 Fit this} {\fittext-1 text} fits “Fit this text” into 1,000 twips. |
\animtextN | Animation: 1 Las Vegas lights, 2 blinking background, 3 sparkle text, 4 marching black ants, 5 marching red ants, 6 shimmer. |
\accnone | No emphasis accent. |
\accdot | Dot accent over each character. |
\acccomma | Comma accent over each character. |
\cchsN | The characters that follow belong to character set N rather than the document’s; values as \fcharset, with Macintosh character sets above 255. |
\langN | Language of the text: see languages. \plain resets it to \deflang. \lang1024 means “no proofing”. |
\langnpN | The same as \lang, written with \noproof and \lang1024 so that the real language is kept. |
\langfeN | Language of Far East text; \plain resets it to \deflangfe. |
\langfenpN | The same as \langfe, for use with \noproof. |
\noproof | Do not check spelling or grammar. Written with \lang1024 for older readers. |
\ltrch | The text that follows is a left-to-right run (default). |
\rtlch | The text that follows is a right-to-left run. |
\cgridN | Character grid. |
\g | Destination related to character grids. |
\gcw | Grid column width. |
\gridtbl | Destination related to character grids. |
\nosectexpand | Do not apply the section’s character spacing (\sectexpand). |
\horzvertN | The group runs across the main direction (horizontal in vertical text, vertical in horizontal text): 0 not compressed, 1 compressed to the line height. |
\twoinoneN | The group is shown as two half-height lines in one line: 0 not enclosed, 1 in parentheses, 2 in square brackets, 3 in angle brackets, 4 in braces. |
The specification describes \cgrid, \g, \gcw
and \gridtbl only as above. To read negative \expnd values
from Word for the Macintosh, which writes −7 to −1 as 57 to 63, use only the low six
bits of the value.
Underlines
| Control word | Underline |
|---|---|
\ul | Continuous. \ul0 turns off every kind of underline. |
\ulnone | Stop all underlining. |
\ulw | Words only, not spaces. |
\uldb | Double. |
\uld | Dotted. |
\uldash | Dashed. |
\uldashd | Dash dot. |
\uldashdd | Dash dot dot. |
\ulldash | Long dash. |
\ulhair | Hairline. |
\ulth | Thick. |
\ulthd | Thick dotted. |
\ulthdash | Thick dashed. |
\ulthdashd | Thick dash dot. |
\ulthdashdd | Thick dash dot dot. |
\ulthldash | Thick long dash. |
\ulwave | Wave. |
\ulhwave | Heavy wave. |
\ululdbwave | Double wave. |
\ulcN | Underline colour (colour table index). |
Character borders, shading and highlighting
<shading> = (\chshdng | <pat>) \chcfpat? \chcbpat?
| Control word | Meaning |
|---|---|
\chbrdr | Border round the text, on all sides; followed by the border kind, width and colour. |
\chshdngN | Shading in hundredths of a per cent. |
\chcfpatN | Colour of the pattern (colour table index). |
\chcbpatN | Fill colour (colour table index). |
\chbghoriz | Horizontal pattern. |
\chbgvert | Vertical pattern. |
\chbgfdiag | Forward diagonal pattern. |
\chbgbdiag | Backward diagonal pattern. |
\chbgcross | Cross pattern. |
\chbgdcross | Diagonal cross pattern. |
\chbgdkhoriz | Dark horizontal pattern. |
\chbgdkvert | Dark vertical pattern. |
\chbgdkfdiag | Dark forward diagonal pattern. |
\chbgdkbdiag | Dark backward diagonal pattern. |
\chbgdkcross | Dark cross pattern. |
\chbgdkdcross | Dark diagonal cross pattern. |
\highlightN | Highlight the text in colour N of the colour table. Highlighting is not a character format and cannot be part of a style. |
Tracked changes
| Control word | Meaning |
|---|---|
\revised | Text inserted since revision marking was turned on. Toggle. |
\deleted | Text marked as deleted. Toggle. |
\revauthN | Author of the insertion: entry N of the revision table. |
\revdttmN | Time of the insertion, a DTTM as a long integer. |
\revauthdelN | Author of the deletion. |
\revdttmdelN | Time of the deletion. |
\crauthN | Author of a formatting change, such as making text bold. |
\crdateN | Time of the formatting change. |
Associated character properties
A run of text can carry two sets of properties: one for left-to-right text and one
for right-to-left text, or one each for low ASCII, high single-byte and double-byte
characters. The word that comes last before the text (\ltrch or
\rtlch; \loch, \hich or \dbch) says
which kind the run is; the associated (\a…) properties written after the
other words apply to the other kinds.
<atext> = <ltrrun> | <rtlrun>
<ltrrun> = \rtlch \af & <aprops>* \ltrch <ptext>
<rtlrun> = \ltrch \af & <aprops>* \rtlch <ptext>
<atext> = <losbrun> | <hisbrun> | <dbrun>
<losbrun> = \hich \af & <aprops> \dbch \af & <aprops> \loch <ptext>
<hisbrun> = \loch \af & <aprops> \dbch \af & <aprops> \hich <ptext>
<dbrun> = \loch \af & <aprops> \hich \af & <aprops> \dbch <ptext>
| Control word | Meaning |
|---|---|
\afN | Associated font (default 0). |
\afsN | Associated font size in half-points (default 24). |
\ab | Associated bold. Toggle. |
\ai | Associated italic. Toggle. |
\acaps | Associated all capitals. Toggle. |
\ascaps | Associated small capitals. Toggle. |
\aoutl | Associated outline. Toggle. |
\ashad | Associated shadow. Toggle. |
\astrike | Associated strikethrough. Toggle. |
\aul | Associated continuous underline; \aul0 turns off all its underlines. |
\auld | Associated dotted underline. |
\auldb | Associated double underline. |
\aulnone | Associated underline off. |
\aulw | Associated word underline. |
\acfN | Associated text colour (default 0). |
\aupN | Associated raise, in half-points (default 6). |
\adnN | Associated lower, in half-points (default 6). |
\aexpndN | Associated character spacing in quarter-points (default 0). |
\alangN | Associated language, from the language table. |
\loch | The text is single-byte low ANSI (0x00–0x7F). |
\hich | The text is single-byte high ANSI (0x80–0xFF). |
\dbch | The text is double-byte characters. |
The specification’s examples:
\ltrch\af2\ab\au\rtlch\ul Sample Text– a right-to-left run in the default bidirectional font, underlined; its left-to-right font is font 2, bold and underlined (\auis printed so in the specification).\plain\rtlch\ltrch Sample Text– a left-to-right run; both fonts are the default font.\rtlch\af5\ab\ai\ltrch\ul Sample Text– a left-to-right run in the default font, underlined; its right-to-left font is font 5, bold and italic. A reader that does not support underline in the associated font underlines both.
Far East text
Double-byte text (Japanese, Chinese, Korean) is written in the code page of its font,
one \'hh per byte. Writers should escape every byte below 0x20 or above
0x7F, and the three special characters \, { and
} (0x5C, 0x7B, 0x7D). A reader that meets a lead byte of a double-byte
character takes the next byte as its trail byte:
| Lead byte | Trail byte | Validity |
|---|---|---|
| Escaped | Raw (0x20–0x7F) | Valid: the standard form. |
| Escaped | Escaped | Valid: the standard form. |
| Raw | Raw | Valid: the RTF-J form. |
| Raw | Escaped | Invalid. |
Japanese Word sets the character set in the font table with \fcharset.
It reads \cpg437 as \fcharset0 and \cpg932 as
\fcharset128, and ignores \cpg when both appear. With neither,
it uses the font’s metrics, and assumes Shift JIS for an unknown font. Single-byte
characters are mapped between character sets (Macintosh to ANSI, for example);
double-byte characters are not.
When a run has no \loch, \hich or \dbch,
Japanese Word treats bytes below 0x80 as \loch; a lead byte followed by a
trail byte as one \dbch character; a lead byte followed by anything else,
or at the end of the run, as \hich; and any other byte from 0x80 as
\hich. In a style, the <dbrun> form should be used.
If a style lacks one of the three, Word uses \f for \loch, any
ANSI font for \hich and any Shift JIS font for \dbch. The
specification’s example:
{\fonttbl{\f5\fswiss\fcharset0\fprq2 Arial;}{\f27\froman\fcharset128\fprq1 Mincho;}}
{\stylesheet{\loch\af5\hich\af5\dbch\f27\fs20\snext0 Normal;}}
\pard\plain
{\dbch\f27\fs20 \'82\'b1\'82\'ea\'82\'cd}
{\loch\f5 Test }
{\dbch\f27\'82\'c5\'82\'b7\'81B}
\par}
RTF-J words
RTF-J, a Japanese dialect of RTF, has three words of its own, which Word reads as follows:
| Control word | Meaning |
|---|---|
\jis | Character set word of RTF-J; read as \ansi. |
\fjminchou | Mincho font family; read as \fnil. |
\fjgothic | Gothic font family; read as \fnil. |
Language codes
The values of \lang, \langfe, \langnp,
\langfenp, \alang, \deflang,
\deflangfe and \ksulang are Windows language identifiers.
The 1.6 specification’s table, in its order; 1024 (0x0400) means no language, used to
skip proofing.
| Language | Hex | Decimal |
|---|---|---|
| Afrikaans | 0x0436 | 1078 |
| Albanian | 0x041c | 1052 |
| Arabic | 0x0401 | 1025 |
| Arabic Algeria | 0x1401 | 5121 |
| Arabic Bahrain | 0x3c01 | 15361 |
| Arabic Egypt | 0x0c01 | 3073 |
| Arabic General | 0x0001 | 1 |
| Arabic Iraq | 0x0801 | 2049 |
| Arabic Jordan | 0x2c01 | 11265 |
| Arabic Kuwait | 0x3401 | 13313 |
| Arabic Lebanon | 0x3001 | 12289 |
| Arabic Libya | 0x1001 | 4097 |
| Arabic Morocco | 0x1801 | 6145 |
| Arabic Oman | 0x2001 | 8193 |
| Arabic Qatar | 0x4001 | 16385 |
| Arabic Syria | 0x2801 | 10241 |
| Arabic Tunisia | 0x1c01 | 7169 |
| Arabic U.A.E. | 0x3801 | 14337 |
| Arabic Yemen | 0x2401 | 9217 |
| Armenian | 0x042b | 1067 |
| Assamese | 0x044d | 1101 |
| Azeri Cyrillic | 0x082c | 2092 |
| Azeri Latin | 0x042c | 1068 |
| Basque | 0x042d | 1069 |
| Bengali | 0x0445 | 1093 |
| Bosnia Herzegovina | 0x101a | 4122 |
| Bulgarian | 0x0402 | 1026 |
| Burmese | 0x0455 | 1109 |
| Byelorussian | 0x0423 | 1059 |
| Catalan | 0x0403 | 1027 |
| Chinese China | 0x0804 | 2052 |
| Chinese General | 0x0004 | 4 |
| Chinese Hong Kong | 0x0c04 | 3076 |
| Chinese Macao | 0x0c04 | 3076 (as printed; Windows uses 0x1404, 5124) |
| Chinese Singapore | 0x1004 | 4100 |
| Chinese Taiwan | 0x0404 | 1028 |
| Croatian | 0x041a | 1050 |
| Czech | 0x0405 | 1029 |
| Danish | 0x0406 | 1030 |
| Dutch Belgium | 0x0813 | 2067 |
| Dutch Standard | 0x0413 | 1043 |
| English Australia | 0x0c09 | 3081 |
| English Belize | 0x2809 | 10249 |
| English British | 0x0809 | 2057 |
| English Canada | 0x1009 | 4105 |
| English Caribbean | 0x2409 | 9225 |
| English General | 0x0009 | 9 |
| English Ireland | 0x1809 | 6153 |
| English Jamaica | 0x2009 | 8201 |
| English New Zealand | 0x1409 | 5129 |
| English Philippines | 0x3409 | 13321 |
| English South Africa | 0x1c09 | 7177 |
| English Trinidad | 0x2c09 | 11273 |
| English United States | 0x0409 | 1033 |
| English Zimbabwe | 0x0409 | 1033 (as printed; Windows uses 0x3009, 12297) |
| Estonian | 0x0425 | 1061 |
| Faeroese | 0x0438 | 1080 |
| Farsi | 0x0429 | 1065 |
| Finnish | 0x040b | 1035 |
| French | 0x040c | 1036 |
| French Belgium | 0x080c | 2060 |
| French Cameroon | 0x2c0c | 11276 |
| French Canada | 0x0c0c | 3084 |
| French Côte d’Ivoire | 0x300c | 12300 |
| French Luxembourg | 0x140c | 5132 |
| French Mali | 0x340c | 13324 |
| French Monaco | 0x180c | 6156 |
| French Réunion | 0x200c | 8204 |
| French Senegal | 0x280c | 10252 |
| French Swiss | 0x100c | 4108 |
| French West Indies | 0x1c0c | 7180 |
| French Democratic Republic of the Congo | 0x240c | 9228 |
| Frisian | 0x0462 | 1122 |
| Gaelic | 0x043c | 1084 |
| Gaelic Ireland | 0x083c | 2108 |
| Galician | 0x0456 | 1110 |
| Georgian | 0x0437 | 1079 |
| German | 0x0407 | 1031 |
| German Austrian | 0x0c07 | 3079 |
| German Liechtenstein | 0x1407 | 5127 |
| German Luxembourg | 0x1007 | 4103 |
| German Switzerland | 0x0807 | 2055 |
| Greek | 0x0408 | 1032 |
| Gujarati | 0x0447 | 1095 |
| Hebrew | 0x040d | 1037 |
| Hindi | 0x0439 | 1081 |
| Hungarian | 0x040e | 1038 |
| Icelandic | 0x040f | 1039 |
| Indonesian | 0x0421 | 1057 |
| Italian | 0x0410 | 1040 |
| Italian Switzerland | 0x0810 | 2064 |
| Japanese | 0x0411 | 1041 |
| Kannada | 0x044b | 1099 |
| Kashmiri | 0x0460 | 1120 |
| Kashmiri India | 0x0860 | 2144 |
| Kazakh | 0x043f | 1087 |
| Khmer | 0x0453 | 1107 |
| Kirghiz | 0x0440 | 1088 |
| Konkani | 0x0457 | 1111 |
| Korean | 0x0412 | 1042 |
| Korean Johab | 0x0812 | 2066 |
| Lao | 0x0454 | 1108 |
| Latvian | 0x0426 | 1062 |
| Lithuanian | 0x0427 | 1063 |
| Lithuanian Classic | 0x0827 | 2087 |
| Macedonian | 0x043e | 1086 (as printed; Windows uses 0x042f, 1071) |
| Malay | 0x043e | 1086 |
| Malay Brunei Darussalam | 0x083e | 2110 |
| Malayalam | 0x044c | 1100 |
| Maltese | 0x043a | 1082 |
| Manipuri | 0x0458 | 1112 |
| Marathi | 0x044e | 1102 |
| Mongolian | 0x0450 | 1104 |
| Nepali | 0x0461 | 1121 |
| Nepali India | 0x0861 | 2145 |
| Norwegian Bokmål | 0x0414 | 1044 |
| Norwegian Nynorsk | 0x0814 | 2068 |
| Oriya | 0x0448 | 1096 |
| Polish | 0x0415 | 1045 |
| Portuguese (Brazil) | 0x0416 | 1046 |
| Portuguese (Portugal) | 0x0816 | 2070 |
| Punjabi | 0x0446 | 1094 |
| Rhaeto-Romanic | 0x0417 | 1047 |
| Romanian | 0x0418 | 1048 |
| Romanian Moldova | 0x0818 | 2072 |
| Russian | 0x0419 | 1049 |
| Russian Moldova | 0x0819 | 2073 |
| Sami Lappish | 0x043b | 1083 |
| Sanskrit | 0x044f | 1103 |
| Serbian Cyrillic | 0x0c1a | 3098 |
| Serbian Latin | 0x081a | 2074 |
| Sindhi | 0x0459 | 1113 |
| Slovak | 0x041b | 1051 |
| Slovenian | 0x0424 | 1060 |
| Sorbian | 0x042e | 1070 |
| Spanish Argentina | 0x2c0a | 11274 |
| Spanish Bolivia | 0x400a | 16394 |
| Spanish Chile | 0x340a | 13322 |
| Spanish Colombia | 0x240a | 9226 |
| Spanish Costa Rica | 0x140a | 5130 |
| Spanish Dominican Republic | 0x1c0a | 7178 |
| Spanish Ecuador | 0x300a | 12298 |
| Spanish El Salvador | 0x440a | 17418 |
| Spanish Guatemala | 0x100a | 4106 |
| Spanish Honduras | 0x480a | 18442 |
| Spanish Mexico | 0x080a | 2058 |
| Spanish Modern | 0x0c0a | 3082 |
| Spanish Nicaragua | 0x4c0a | 19466 |
| Spanish Panama | 0x180a | 6154 |
| Spanish Paraguay | 0x3c0a | 15370 |
| Spanish Peru | 0x280a | 10250 |
| Spanish Puerto Rico | 0x500a | 20490 |
| Spanish Traditional | 0x040a | 1034 |
| Spanish Uruguay | 0x380a | 14346 |
| Spanish Venezuela | 0x200a | 8202 |
| Sutu | 0x0430 | 1072 |
| Swahili | 0x0441 | 1089 |
| Swedish | 0x041d | 1053 |
| Swedish Finland | 0x081d | 2077 |
| Tajik | 0x0428 | 1064 |
| Tamil | 0x0449 | 1097 |
| Tatar | 0x0444 | 1092 |
| Telugu | 0x044a | 1098 |
| Thai | 0x041e | 1054 |
| Tibetan | 0x0451 | 1105 |
| Tsonga | 0x0431 | 1073 |
| Tswana | 0x0432 | 1074 |
| Turkish | 0x041f | 1055 |
| Turkmen | 0x0442 | 1090 |
| Ukrainian | 0x0422 | 1058 |
| Urdu | 0x0420 | 1056 |
| Urdu India | 0x0820 | 2080 |
| Uzbek Cyrillic | 0x0843 | 2115 |
| Uzbek Latin | 0x0443 | 1091 |
| Venda | 0x0433 | 1075 |
| Vietnamese | 0x042a | 1066 |
| Welsh | 0x0452 | 1106 |
| Xhosa | 0x0434 | 1076 |
| Yiddish | 0x043d | 1085 |
| Zulu | 0x0435 | 1077 |
A language identifier is a 16-bit number: the low ten bits are the primary language (0x09 English, 0x0C French) and the high six bits the sublanguage (1 the main country, 2 the next, and so on), so 0x0809 is English, sublanguage 2, British.