Sei sulla pagina 1di 68

RichTextFormatSpecificationv.1.

2 Page1

Rich-Text Format Specification v. 1.2


Introduction 2
RTFSyntax......................................................................................................................................................2

ConventionsofanRTFReader.....................................................................................................................4
ChangeDestination...............................................................................................................................4
ChangeFormattingProperty.................................................................................................................5
InsertSpecialCharacter........................................................................................................................5
InsertSpecialCharacterandPerformAction.......................................................................................5

FormalSyntax.................................................................................................................................................5

ContentsofanRTFFile.................................................................................................................................5
Header.......................................................................................................................................................6
RTFVersion.........................................................................................................................................6
CharacterSet.........................................................................................................................................6
FontTable.............................................................................................................................................6
CodePageSupport...........................................................................................................................8
FontEmbedding................................................................................................................................8
TheFileTable.......................................................................................................................................8
ColorTable...........................................................................................................................................9
StyleSheet..........................................................................................................................................10
RevisionMarks...................................................................................................................................11
DocumentArea.......................................................................................................................................12
InformationGroup..............................................................................................................................12
DocumentFormattingProperties.......................................................................................................13
SectionText............................................................................................................................................17
SectionFormattingProperties............................................................................................................17
HeadersandFooters...........................................................................................................................19
ParagraphText........................................................................................................................................20
ParagraphFormattingProperties........................................................................................................20
Tabs.....................................................................................................................................................21
BulletsandNumbering.......................................................................................................................22
ParagraphBorders..............................................................................................................................24
ParagraphShading..............................................................................................................................24
AbsolutePositionedObjectsandFrames...........................................................................................25
TableDefinitions................................................................................................................................26
CharacterText........................................................................................................................................29
CharacterFormattingProperties........................................................................................................29
AssociatedCharacterProperties.........................................................................................................32
SpecialCharacters..............................................................................................................................33
Bookmarks..........................................................................................................................................35
Pictures...............................................................................................................................................35
Objects................................................................................................................................................38
MacintoshEditionManagerPublisherObjects..............................................................................40
RichTextFormatSpecificationv.1.2 Page2

DrawingObjects.................................................................................................................................40
Footnotes.............................................................................................................................................45
Annotations.........................................................................................................................................46
Fields...................................................................................................................................................46
IndexEntries.......................................................................................................................................47
TableofContentsEntries...................................................................................................................48
Bidirectionallanguagesupport...........................................................................................................48

AlphabeticListofRTFKeywords..............................................................................................................49

Introduction
Therichtextformat(RTF)standardisamethodofencodingformattedtextandgraphicsforeasytransfer
betweenapplications.Currently,usersdependonspecialtranslationsoftwaretomovewordprocessing
documentsbetweendifferentMSDOS,Windows,OS/2applications,andAppleMacintoshapplications.
5 TheRTFstandardprovidesaformatfortextandgraphicsinterchangethatcanbeusedwithdifferentoutput
devices,operatingenvironments,andoperatingsystems.RTFusestheANSI,PC8,Macintosh,orIBMPC
charactersettocontroltherepresentationandformattingofadocument,bothonthescreenandinprint.
WiththeRTFstandard,documentscreatedunderdifferentoperatingsystemsandwithdifferentsoftware
applicationscanbetransferredamongthoseoperatingsystemsandapplications.
10 SoftwarethattakesaformattedfileandturnsitintoanRTFfileiscalledawriter.Softwarethattranslates
anRTFfileintoaformattedfileiscalledareader.AnRTFwriterseparatestheapplication'scontrol
informationfromtheactualtextandwritesanewfilecontainingthetextandtheRTFgroupsassociated
withthattext.AnRTFreaderdoestheconverseofthisprocedure.

RTF Syntax
15 AnRTFfileconsistsofunformattedtext,controlwords,controlsymbols,andgroups.Foreaseoftransport,
astandardRTFfilecanconsistofonly7bitASCIIcharacters.(Convertersthatcommunicatewith
MicrosoftWordforWindowsorMicrosoftWordfortheMacintoshshouldexpect8bitcharacters.)
AcontrolwordisaspeciallyformattedcommandthatRTFusestomarkprintercontrolcodesand
informationthatapplicationsusetomanagedocuments.Acontrolwordtakesthefollowingform:
20 \ LetterSequence<Delimiter>

Notethatabackslashbeginseachcontrolword.
TheLetterSequenceismadeupoflowercasealphabeticcharactersbetweenaandzinclusive.RTFis
casesensitive,andallRTFkeywordsshouldbelowercase.
TheDelimitermarkstheendofanRTFcontrolword,andcanbeoneofthefollowing:
25 Aspace.Inthiscase,thespaceispartofthecontrolword.
Adigitorahyphen(),whichindicatesthatanumericparameterfollows.Thesubsequentdigit
sequenceisthendelimitedbyaspaceoranycharacterotherthanaletteroradigit.Inotherwords,the
parametercanbeapositiveornegativenumber.Therangeofthevaluesforthenumberis32767
through32767.However,MicrosoftWordforWindows,WordforOS/2,andWordfortheMacintosh
30 restricttherangeto31680through31680.Ifanumericparameterimmediatelyfollowsthecontrol
word,thisparameterbecomespartofthecontrolword.Thecontrolwordisthendelimitedbyaspace
oranonalphabeticornonnumericcharacterinthesamemannerasanycontrolword.
Anycharacterotherthanaletteroradigit.Inthiscase,thedelimitingcharacterterminatesthecontrol
RichTextFormatSpecificationv.1.2 Page3

wordbutisnotactuallypartofthecontrolword.
Ifaspacedelimitsthecontrolword,spacedoesnotappearinthedocument.Anycharactersfollowingthe
delimiter,includingspaces,willappearinthedocument.Forthisreason,youshouldusespacesonlywhere
necessary;donotusespacesmerelytobreakupRTFcode.
5 Acontrolsymbolconsistsofabackslashfollowedbyasingle,nonalphabeticcharacter.Forexample,\ ~

representsanonbreakingspace.Controlsymbolstakenodelimiters.
Agroupconsistsoftextandcontrolwordsorcontrolsymbolsenclosedinbraces({}).Theopeningbrace
({)indicatesthestartofthegroupandtheclosingbrace(})indicatestheendofthegroup.Eachgroup
specifiesthetextaffectedbythegroupandthedifferentattributesofthattext.TheRTFfilecanalso
10 includegroupsforfonts,styles,screencolor,pictures,footnotes,annotations,headersandfooters,
summaryinformation,fields,andbookmarks,aswellasdocument,section,paragraph,andcharacter
formattingproperties.Ifthefont,style,screencolor,andsummaryinformationgroupsanddocument
formattingpropertiesareincluded,theymustprecedethefirstplaintextcharacterinthedocument.These
groupsformtheRTFfileheader.Ifthegroupforfontsisincluded,itshouldprecedethegroupforstyles.If
15 anygroupisnotused,itcanbeomitted.Thegroupsarediscussedinthefollowingsections.
Certaincontrolwordscontrolproperties(suchasbold,italic,keeptogether,andsoforth)thathaveonly
twostates.Whensuchacontrolwordhasnoparameterorhasanonzeroparameter,itisassumedthatthe
controlwordturnsontheproperty.Whensuchacontrolwordhasaparameterof0(zero),itisassumed
thatthecontrolwordturnsofftheproperty.Forexample,\ bturnsonbold,whereas\ b0turnsoffbold.

20 Certaincontrolwords,referredtoasdestinations,markthebeginningofacollectionofrelatedtextwhich
couldappearatanotherposition,ordestination,withinthedocument.Destinationsmayalsobetextwhich
isusedbutshouldnotappearwithinthedocumentatall.Anexampleofadestinationisthe\ footnote

group,wherethefootnotetextfollowsthecontrolword.Destinationcontrolwordsandtheirfollowingtext
mustbeenclosedinbraces.DestinationsaddedaftertheRTFspecificationpublishedintheMarch1987
25 MicrosoftSystemsJournalmaybeprecededbythecontrolsymbol\ *.Thiscontrolsymbolidentifies

destinationswhoserelatedtextshouldbeignorediftheRTFreaderdoesnotrecognizethedestination.
(RTFwritersshouldfollowtheconventionofusingthiscontrolsymbolwhenaddingnewdestinationsor
groups.)DestinationswhoserelatedtextshouldbeinsertedintothedocumenteveniftheRTFreaderdoes
notrecognizethedestinationshouldnotuse\ *.AlldestinationsthatwerenotincludedintheMarch1987

30 revisionoftheRTFspecificationareshownwith\ *aspartofthecontrolword.

Formattingspecifiedwithinagroupaffectsonlythetextwithinthatgroup.Generally,textwithinagroup
inheritstheformattingofthetextintheprecedinggroup.However,MicrosoftimplementationsofRTF
assumethatthefootnote,annotation,header,andfootergroups(describedlaterinthischapter)donot
inherittheformattingoftheprecedingtext.Therefore,toensurethatthesegroupsarealwaysformatted
35 correctly,youshouldsettheformattingwithinthesegroupstothedefaultwiththe\ sectd,\ pard,

and\ plaincontrolwords,andthenaddanydesiredformatting.

Thecontrolwords,controlsymbols,andbracesconstitutecontrolinformation.Allothercharactersinthe
fileareplaintext.Hereisanexampleofplaintextthatdoesnotexistwithinagroup:
{\rtf\ansi\deff0{\fonttbl{\f0\fromanTmsRmn;}{\f1\fdecor
40 Symbol;}{\f2\fswissHelv;}}{\colortbl;\red0\green0\blue0;
\red0\green0\blue255;\red0\green255\blue255;\red0\green255\
blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\
green255\blue0;\red255\green255\blue255;}{\stylesheet{\fs20\snext0Normal;}}{\info{\author
JohnDoe}
45 {\creatim\yr1990\mo7\dy30\hr10\min48}{\version1}{\edmins0}
{\nofpages1}{\nofwords0}{\nofchars0}{\vern8351}}\widoctrl\ftnbj\sectd\linex0\endnhere
\pard\plain\fs20Thisisplaintext.\par}

ThephraseThisisplaintextisnotpartofagroupandistreatedasdocumenttext.
50 Aspreviouslymentioned,thebackslash( \ )andbraces({})havespecialmeaninginRTF.Tousethese

charactersastext,precedethemwithabackslash,asin\ \ ,\ {,and\ }.

RichTextFormatSpecificationv.1.2 Page4

Conventions of an RTF Reader


ThereaderofanRTFstreamisconcernedwiththefollowing:
Separatingcontrolinformationfromplaintext.
Actingoncontrolinformation.
5 Collectingandproperlyinsertingtextintothedocument,asdirectedbythecurrentgroupstate.
Actingoncontrolinformationisdesignedtobearelativelysimpleprocess.Somecontrolinformation
simplycontributesspecialcharacterstotheplaintextstream.Otherinformationservestochangethe
programstate,whichincludespropertiesofthedocumentasawhole,ortochangeanyofacollectionof
groupstates,whichapplytopartsofthedocument.
10 Aspreviouslymentioned,agroupstatecanspecifythefollowing:
Thedestination,orpartofthedocumentthattheplaintextisconstructing.
Characterformattingproperties,suchasboldoritalic.
Paragraphformattingproperties,suchasjustifiedorcentered.
Sectionformattingproperties,suchasthenumberofcolumns.
15 Tableformattingproperties,whichdefinethenumberofcellsanddimensionsofatablerow.
Inpractice,anRTFreaderwillevaluateeachcharacteritreadsinsequenceasfollows:
Ifthecharacterisanopeningbrace({),thereaderstoresitscurrentstateonthestack.Ifthecharacteris
aclosingbrace(}),thereaderretrievesthecurrentstatefromthestack.
Ifthecharacterisabackslash,thereadercollectsthecontrolwordorcontrolsymbolanditsparameter,
20 ifany,andlooksupthecontrolwordorcontrolsymbolinatablethatmapscontrolwordstoactions.It
thencarriesouttheactionprescribedinthetable.(Thepossibleactionsarediscussedbelow.)Theread
pointerisleftbeforeorafteracontrolworddelimiter,asappropriate.
Ifthecharacterisanythingotherthanopeningbrace({),closingbrace(}),orbackslash(\) ,thereader

assumesthatthecharacterisplaintextandwritesthecharactertothecurrentdestinationusingcurrent
25 formattingproperties.
IftheRTFreadercannotfindaparticularcontrolwordorcontrolsymbolinthelookuptabledescribed
above,thecontrolwordorcontrolsymbolshouldbeignored.Ifacontrolwordorcontrolsymbolis
precededbyanopeningbrace({),itispartofagroup.Thecurrentstateshouldbesavedonthestack,but
nostatechangeshouldoccur.Whenaclosingbrace(})isencountered,thecurrentstateshouldberetrieved
30 fromthestack,therebyresettingthecurrentstate.Ifthe\ *controlsymbolprecedesacontrolword,thenit

definesadestinationgroupandwasitselfprecededbyanopeningbrace({).TheRTFreadershoulddiscard
alltextuptoandincludingtheclosingbrace(})thatclosesthisgroup.AllRTFreadersmustrecognizeall
destinationsdefinedintheMarch1987RTFspecification.Thereadermayskippastthegroup,butitisnot
allowedtosimplydiscardthecontrolword.DestinationsdefinedsinceMarch1987aremarkedwiththe\*
35 controlsymbol.

Note
AllRTFreadersmustimplementthe\*controlsymboltobeabletoreadRTFfileswrittenbynewerRTF
writers.
ForcontrolwordsorcontrolsymbolsthattheRTFreadercanfindinthelookuptable,thepossibleactions
40 areasfollows.

Change Destination
TheRTFreaderchangesthedestinationtothedestinationdescribedinthetableentry.Destinationchanges
arelegalonlyimmediatelyafteranopeningbrace({).(Otherrestrictionsmayalsoapply;forexample,
RichTextFormatSpecificationv.1.2 Page5

footnotescannotbenested.)Manydestinationchangesimplythatthecurrentpropertysettingswillbereset
totheirdefaultsettings.Examplesofcontrolwordsthatchangedestinationare\ footnote,\ header,\ footer,

\ pict,\ info,\ fonttbl,\ stylesheet,and\ colortbl.Thischapteridentifiesalldestinationcontrolwordswhere


theyappearincontrolwordtables.

5 Change Formatting Property


TheRTFreaderchangesthepropertyasdescribedinthetableentry.Theentrywillspecifywhethera
parameterisrequired.AlphabeticListofRTFKeywords,laterinthischapter,alsospecifieswhich
controlwordsrequireparameters.Ifaparameterisneededandnotspecified,thenadefaultwillbeused.
Thedefaultvalueuseddependsonthecontrolword.Ifthecontrolworddoesnotspecifyadefault,thenall
10 RTFreadersshouldassumeadefaultof0.

Insert Special Character


Thereaderinsertsintothedocumentthecharactercodeorcodesdescribedinthetableentry.

Insert Special Character and Perform Action


Thereaderinsertsintothedocumentthecharactercodeorcodesdescribedinthetableentryandperforms
15 whateverotheractiontheentryspecifies.Forexample,whenMicrosoftWordinterprets\ par,aparagraph

markisinsertedinthedocumentandspecialcodeisruntorecordtheparagraphpropertiesbelongingto
thatparagraphmark.

Formal Syntax
ThischapterdescribesRTFusingthefollowingsyntax,basedonBackusNaurForm:
Syntax Meaning
#PCDATA Text(withoutcontrolwords)
#SDATA Hexadecimaldata
#BDATA Binarydata
'c' Aliteral
<text> Anonterminal
a The(terminal)controlworda,withoutaparameter.
a The(terminal)controlworda,withaparameter
a? Itemaisoptional.
a+ Oneormorerepetitionsofitema.
a* Zeroormorerepetitionsofitema.
ab Itemafollowedbyitemb.
a|b Itemaoritemb
a&b Itemaand/oritemb,inanyorder
20

Contents of an RTF File


AnRTFfilehasthefollowingsyntax:
<File> '{'<header><document>'}'

Thissyntaxisoverlystrict;allRTFreadersmustreadRTFthatdoesnotconformtothissyntax.However,
RichTextFormatSpecificationv.1.2 Page6

allRTFreadersmustcorrectlyreadRTFwrittenaccordingtothissyntax.IfyouwriteRTFthatconforms
tothissyntax,allcorrectRTFreaderswillreadit.

Header
Theheaderhasthefollowingsyntax:
<header> \ rtf<charset>\ deff?<fonttbl><colortbl><stylesheet>?

5
RTF Version
AnentireRTFfileisconsideredagroupandmustbeenclosedinbraces.Thecontrolword\ rtfNmust

followtheopeningbrace.ThenumericparameterNidentifiestheversionoftheRTFstandardused.The
RTFstandarddescribedinthischaptercorrespondstoRTFSpecificationVersion1.

10 Character Set
AfterspecifyingtheRTFversion,youmustdeclarethecharactersetusedinthisdocument.Thecontrol
wordforthecharactersetmustprecedeanyplaintextoranytablecontrolwords.TheRTFspecification
currentlysupportsthefollowingcharactersets:
Controlword Characterset
\ ansi
ANSI(default)
\ mac
AppleMacintosh
\ pc
IBMPCcodepage437
\ pca
IBMPCcodepage850,usedbyIBMPersonalSystem/2(notimplementedinversion1
ofWordforOS/2)

15 Font Table
The\ fonttblcontrolwordintroducesthefonttablegroup.Thisgroupdefinesthefontsavailableinthe

documentandhasthefollowingsyntax:
<fonttbl> '{'\ fonttbl(<fontinfo>|('{'<fontinfo>'}'))+'}'

<fontinfo> <fontnum><fontfamily><fcharset><fprq><fontemb>?<codepage>?
<fontname><fontaltname>';'
<fontnum> \ f

<fontfamily> \ fnil|\ froman|\ fswiss|\ fmodern|\ fscript|\ fdecor|\ ftech|\ fbidi


<fcharset> \ fcharset

<fprq> \ fprq

<fontname> #PCDATA
<fontaltname> '{\*'\falt#PCDATA'}'
<fontemb> '{\ *'\ fontemb<fonttype><fontfname>?<data>?'}'

<fonttype> \ ftnil|\ fttruetype


<fontfname> '{\ *\ fontfile<codepage>?#PCDATA'}'


<codepage> \ cpg

Notefor<fontemb>thateither<fontname>or<data>mustbepresent,althoughbothmaybepresent.
20 AllfontsavailabletotheRTFwritercanbeincludedinthefonttable,evenifthedocumentdoesn'tuseall
RichTextFormatSpecificationv.1.2 Page7

thefonts.
RTFalsosupportsfontfamilies,sothatapplicationscanattempttointelligentlychoosefontsiftheexact
fontisnotpresentonthereadingsystem.RTFusesthefollowingcontrolwordstodescribethevariousfont
families.
Controlword Fontfamily
\ fnil
Unknownordefaultfonts(default)
\ froman
Roman,proportionallyspacedseriffonts(TmsRmn,Palatino,etc.)
\ fswiss
Swiss,proportionallyspacedsansseriffonts(Swiss,etc.)
\ fmodern
Fixedpitchserifandsansseriffonts(Courier,Pica,etc.)
\ fscript
Scriptfonts(Cursive,etc.)
\ fdecor
Decorativefonts(OldEnglish,ITCZapfChancery,etc.)
\ ftech
Technical,symbol,andmathematicalfonts(Symbol,etc.)
\ fbidi
Arabic,Hebrew,orotherbidirectionalfont(Miriam,etc.)
5
IfanRTFfileusesadefaultfont,thedefaultfontnumberisspecifiedwiththe\ deffNcontrolword,which

mustprecedethefonttablegroup.TheRTFwritersuppliesthedefaultfontnumberusedinthecreationof
thedocumentasthenumericargumentN.TheRTFreaderthentranslatesthisnumberthroughthefont
tableintothemostsimilarfontavailableonthereader'ssystem.
10 Thefollowingcontrolwordsspecifythecharactersetandpitchofafontinthefonttable:
Controlword Definition
\ fcharsetN
Specifiesthecharactersetofafontinthefonttable.
\ fprqN
Specifiesthepitchofafontinthefonttable.

If\fcharsetisspecified,theNargumentcanbeoneofthefollowingtypes:
Characterset Nvalue
ANSI_CHARSET 0
SYMBOL_CHARSET 2
SHIFTJIS_CHARSET 128
GREEK_CHARSET 161
TURKISH_CHARSET 162
HEBREW_CHARSET 177
ARABICSIMPLIFIED_CHARSET 178
ARABICTRADITIONAL_CHARSET 179
ARABICUSER_CHARSET 180
HEBREWUSER_CHARSET 181
CYRILLIC_CHARSET 204
EASTERNEUROPE_CHARSET 238
PC437_CHARSET 254
OEM_CHARSET 255

If\fprqisspecified,theNargumentcanbeoneofthefollowingvalues:
RichTextFormatSpecificationv.1.2 Page8

Pitch Value
Defaultpitch 0
Fixedpitch 1
Variablepitch 2

Code Page Support


Afontmayhaveadifferentcharactersetfromthecharactersetofthedocument.Forexample,theSymbol
fonthasthesamecharactersinthesamepositionsonboththeMacintoshandWindows.RTFdescribesthis
5 withthe\ cpgcontrolword,whichnamesthecharactersetusedbythefont.Inaddition,filenames(usedin

fieldinstructionsandinembeddedfonts)maynotnecessarilybethesameasthecharactersetofthe
document,andthe\ cpgcontrolwordcanchangethecharactersetforthesefilenames,aswell.However,

allRTFdocumentsmuststilldeclareacharacterset,tomaintainbackwardscompatibilitywitholderRTF
readers.
10 Thetablebelowdescribesvalidvaluesfor\ cpg:

Value Description
437 UnitedStatesIBM
708 Arabic(ASMO708)
709 Arabic(ASMO449+,BCONV4)
710 Arabic(TransparentArabic)
711 Arabic(NafithaEnhanced)
720 Arabic(TransparentASMO)
819 Windows3.1(UnitedStates&WesternEurope)
850 IBMMultilingual
852 EasternEuropean
860 Portuguese
862 Hebrew
863 FrenchCanadian
864 Arabic
865 Norwegian
866 SovietUnion
932 Japanese
1250 Windows3.1(EasternEuropean)
1251 Windows3.1(SovietUnion)

Font Embedding
RTFsupportsembeddedfontswiththe\ fontembgrouplocatedinsideafontdefinition.Anembeddedfont

canbespecifiedbyafilename,ortheactualfontdatamaybelocatedinsidethegroup.Ifafilenameis
15 specified,itiscontainedinthe\ fontfilegroup.The\ cpgcontrolwordcanbeusedtospecifythecharacter

setforthefilename.
RTFsupportsTrueTypeandotherembeddedfonts.Thetypeoftheembeddedfontisdescribedbythe
followingcontrolwords:
Controlword Embeddedfonttype
RichTextFormatSpecificationv.1.2 Page9

\ ftnil
Unknownordefaultfonttype(default)
\ fttruetype
TrueTypefont

The File Table


The\ filetblcontrolwordintroducesthefiletabledestination,anewdestination.Thisgroupdefinesthe

filesreferencedinthedocumentandhasthefollowingsyntax:
<filetbl> '{\ *'\ filetbl('{'<fileinfo>'}')+'}'

<fileinfo> '{'\ file<filenum><relpath>?<osnum>?<filesource>+<filename>';}'


<filenum> \ fid

<relpath> \ frelative

<osnum> \ fosnum

<filesource> \ fvalidmac|\ fvaliddos|\ fvalidntfs|\ fvalidhpfs|\ fnetwork


<filename> #PCDATA
5
Notethatthefilenamecanbeanyvalidalphanumericstringforthenamedfilesystem,givingthecomplete
pathandfilename.
Controlword Definition
\ filetbl
Astructureanalogoustothestyleorfonttable,thefiletableisalistofdocuments
referencedbythecurrentdocument.Thisisadestinationcontrolwordoutputaspartof
thedocumentheader.
\ file
Thismarksthebeginningofafilegroup,whichlistsrelevantinformationaboutthe
referencedfile.Thisisadestinationcontrolword.
\ fidN
FileIDnumber.Filesarereferencedlaterinthedocumentusingthisnumber.
\ frelativeN
Thecharacterpositionwithinthepath(startingatzero)wherethereferencedfile'spath
startstoberelativetothepathoftheowningdocument.Forexample,adocumentis
savedtothepathc:\ private\ resume\ foo.docanditsfiletablecontainsthepath

c:\ private\ resume\ edu\ bar.doc,thenthatentryinthefiletablewillbe\ frelative18,to


pointatthecharacter'e'in"edu".Thisistoallowpreservationofrelativepaths.
\ fosnumN
CurrentlyonlyfilledinforpathsfromtheMacintoshfilesystem.ItisaOSspecific
numberforidentifyingthefile,whichmaybeusedtospeedupaccesstothefile,orfind
itifithasbeenmovedtoanotherfolderondisk.TheMacOSnameforthisnumberis
the"fileid".Additionalmeaningsofthe\ fosnumNmaybedefinedforotherfile

systemsinthefuture.
\ fvalidmac
Macintoshfilesystem.
\ fvaliddos
MSDOSfilesystem.
\ fvalidntfs
NTFSfilesystem.
\ fvalidhpfs
HPFSfilesystem.
\ fnetwork
Networkfilesystem.Thiskeywordmaybeusedinconjunctionwithanyoftheprevious
filesourcekeywords.

Color Table
10 The\ colortblcontrolwordintroducesthecolortablegroup,whichdefinesscreencolors,charactercolors,

RichTextFormatSpecificationv.1.2 Page10

andothercolorinformation.Thisgrouphasthefollowingsyntax:
<colortbl> '{'\ colortbl<colordef>+'}'

<colordef> \ red?&\ green?&\ blue?';'


Thefollowingarevalidcontrolwordsforthisgroup:
Controlword Meaning
\ redN
Redindex
\ greenN
Greenindex
\ blueN
Blueindex

5 Eachdefinitionmustbedelimitedbyasemicolon,evenifthedefinitionisomitted.Ifacolordefinitionis
omitted,theRTFreaderusesitsdefaultcolor.Intheexamplebelow,threecolorsaredefined.Thefirst
colorisomitted,asshownbythesemicolonfollowingthe\ colortblcontrolword.

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

10 Theforegroundandbackgroundcolorsuseindexesintothecolortabletodefineacolor.Formore
informationoncolorsetup,seeyourWindowsdocumentation.
Thefollowingexampledefinesablockoftextincolor(wheresupported).Notethatthecf/cbindexisthe
indexofanentryinthecolortable,whichrepresentsared/green/bluecolorcombination.
{\f1\cb1\cf2Thisiscoloredtext.Thebackgroundiscolor
15 1andtheforegroundiscolor2.}

Ifthefileistranslatedforsoftwarethatdoesnotdisplaycolor,thereaderignoresthecolortablegroup.

Style Sheet
The\ stylesheetcontrolwordintroducesthestylesheetgroup,whichcontainsdefinitionsanddescriptions

20 ofthevariousstylesusedinthedocument.Allstylesinthedocument'sstylesheetcanbeincluded,evenif
notallthestylesareused.InRTF,astyleisashorthandusedtospecifyasetofcharacter,paragraph,or
sectionformatting.
Thestylesheetgrouphasthefollowingsyntax:
<stylesheet> '{'\ stylesheet<style>+'}'

<style> '{'<styledef>?<keycode>?<formatting><additive>?<based>?<next>?<stylename>?';'
'}'
<styledef> \ s|\ cs|\ ds

<keycode> '{'\ keycode<keys>'}'


<additive> \additive
<based> \ sbasedon

<next> \ snext

<formatting> (<brdrdef>|<parfmt>|<apoctl>|<tabdef>|<shading>|<chrfmt>)+
<stylename> #PCDATA
<keys> (\ shift?&\ ctrl?&\ alt?)<key>

<key> \ fn|#PCDATA

25 For<style>,both<styledef>and<stylename>areoptional;thedefaultisparagraphstyle0.Notefor
<stylename>thatMicrosoftWordfortheMacintoshinterpretscommasin#PCDATAasseparatingstyle
RichTextFormatSpecificationv.1.2 Page11

synonyms.Also,for<key>,thedatamustbeexactlyonecharacter.
Controlword Meaning
\ additive
Usedinacharacterstyledefinition({\ *\ cs).Indicatesthatstyleattributesaretobe

appliedinadditiontocurrentattributes,ratherthansettingthecharacterattributestoonly
thestyledefinition.
\ sbasedonN
Definesthenumberofthestyleonwhichthecurrentstyleisbased(defaultis222no
style).
\ snextN
Definesthenextstyleassociatedwiththecurrentstyle;ifomitted,thenextstyleisthe
currentstyle.
\ keycode
ThisgroupisspecifiedwithinthedescriptionofastyleinthestylesheetintheRTF
header.Thesyntaxforthisgroupis{\ *\ keycodeKeys}whereKeysarethecharacters

usedinthekeycode.Forexample,astyle,Normal,maybedefined{\ s0

{\ *\ keycode\ shift\ ctrln}Normal;}withintheRTFstylesheet.SeetheSpecialCharacter


controlwordsforthecharactersoutsideofthealphanumericrangethatmaybeused.
\ alt
TheALTmodifierkey.Usedtodescribequickkeycodesforstyles.
\ shift
TheSHIFTmodifierkey.Usedtodescribequickkeycodesforstyles.
\ ctrl
TheCTRLmodifierkey.Usedtodescribequickkeycodesforstyles.
\ fnN
SpecifiesafunctionkeywhereNisthefunctionkeynumber.Usedtodescribequickkey
codesforstyles.

ThefollowingisanexampleofanRTFstylesheet:
{\stylesheet{\fs20\sbasedon222\snext0{\*\keycode\shift\ctrln}
5 Normal;}{\s1\ar\fs20\sbasedon0\snext1FLUSHRIGHT;}{\s2\fi
720\li720\fs20\ri2880\sbasedon0\snext2IND;}}

andRTFparagraphstowhichthestylesareapplied:
\widowctrl\ftnbj\ftnrestart\sectd\linex0\endnhere\pard\plain
10 \fs20ThisisNormalstyle.
\par\pard\plain\s1
Thisisrightjustified.IcallthisstyleFLUSHRIGHT.
\par\pard\plain\s2
Thisisanindentedparagraph.IcallthisstyleIND.Itproduces
15 ahangingindent.
\par}

Intheprecedingexample,thePostScriptstyleisdeclaredbutnotused.Someofthecontrolwordsinthis
examplearediscussedinlatersections.
20 Revision Marks
Thistableallowstrackingofmultipleauthorsandreviewersofadocument,andisusedinconjunctionwith
thecharacterpropertiesforrevisionmarks.
Controlword Definition
\ revtbl
Thisgroupconsistsofsubgroupsthateachidentifytheauthorofarevisioninthe
document,asin{Author1;}.Thisisadestinationcontrolword.
Revisionconflicts,suchasoneauthordeletinganother'sadditions,arestoredasone
group,inthefollowingform:
CurrentAuthor\'00\'<lengthofpreviousauthor'sname>PreviousAuthor\'00
PreviousRevisionTime
ThefourbytesoftheDTTMstrucutreareemittedasASCIIcharacters,sovalues>127
RichTextFormatSpecificationv.1.2 Page12

shouldbeemittedasquotedhexvalues.

Alltimereferencesforrevisionmarksusethefollowingbitfieldstructure,DTTM:
Bitnumbers Information Range
05 Minute 059
610 Hour 023
1115 Dayofmonth 131
1619 Month 112
2028 Year =Year1900
2931 Dayofweek 0(Sun)6(Sat)

Document Area
5 OncetheRTFheaderisdefined,theRTFreaderhasenoughinformationtocorrectlyreadtheactual
documenttext.Thedocumentareahasthefollowingsyntax:
<document> <info>?<docfmt>*<section>+

Information Group
The\ infocontrolwordintroducestheinformationgroup,whichcontainsinformationaboutthedocument.

10 Thiscanincludethetitle,author,keywords,comments,andotherinformationspecifictothefile.This
informationisforusebyadocumentmanagementutility,ifavailable.
Thisgrouphasthefollowingsyntax:
<info> '{'<title>?&<subject>?&<author>?&<operator>?&<keywords>?&<comment>?
&\ version?&<doccomm>?&\ vern?&<creatim>?&<revtim>?&<printim>?&

<buptim>?&\ edmins?&\ nofpages?&\ nofwords?&\ id?'}'


<title> '{'\ title#PCDATA'}'


<subject> '{'\ subject#PCDATA'}'


<author> '{'\ author#PCDATA'}'


<operator> '{'\ operator#PCDATA'}'


<keywords> '{'\ keywords#PCDATA'}'


<comment> '{'\ comment#PCDATA'}'


<doccomm> '{'\ doccomm#PCDATA'}'


<creatim> '{'\ creatim<time>'}'


<revtim> '{'\ revtim<time>'}'


<printim> '{'\ printim<time>'}'


<buptim> '{'\ buptim<time>'}'


<time> \ yr?\ mo?\ dy?\ hr?\ min?\ sec?


Someapplications,suchasWord,askausertotypethisinformationwhensavingthedocumentinits
15 nativeformat.IfthedocumentisthensavedasanRTFfileortranslatedintoRTF,theRTFwriterspecifies
thisinformationusingthefollowingcontrolwords.Thesecontrolwordsaredestinationsandboththe
controlwordsandthetextshouldbeenclosedinbraces({}).
RichTextFormatSpecificationv.1.2 Page13

Controlword Meaning
\ title
Titleofthedocument.Thisisadestinationcontrolword.
\ subject
Subjectofthedocument.Thisisadestinationcontrolword.
\ author
Authorofthedocument.Thisisadestinationcontrolword.
\ operator
Personwholastmadechangestothedocument.Thisisadestinationcontrolword.
\ keywords
Selectedkeywordsforthedocument.Thisisadestinationcontrolword.
\ comment
Comments;textisignored.Thisisadestinationcontrolword.
\ versionN
Versionnumberofthedocument.
\ doccomm
CommentsdisplayedinWord'sEditSummaryInfodialogbox.Thisisadestination
controlword.

TheRTFwritermayautomaticallyenterothercontrolwords,includingthefollowing:
Controlword Meaning
\ vernN
Internalversionnumber
\ creatim
Creationtime
\ revtim
Revisiontime
\ printim
Lastprinttime
\ buptim
Backuptime
\ edminsN
Totaleditingtime(inminutes)
\ yrN
Year
\ moN
Month
\ dyN
Day
\ hrN
Hour
\ minN
Minute
\ secN
Seconds
\ nofpagesN
Numberofpages
\ nofwordsN
Numberofwords
\ nofcharsN
Numberofcharacters
\ idN
InternalIDnumber

Anycontrolworddescribedintheprevioustablethatdoesnothaveanumericparameterspecifiesadate;
5 alldatesarespecifiedwiththe\ yr\ mo\ dy\ hr\ min\ seccontrols.Anexampleofaninformationgroup

follows:
{\info{\titleThePanda'sThumb}{\authorStephenJGould}{\keywords
sciencenaturalhistory}}

10 Document-Formatting Properties
Aftertheinformationgroup(ifany),theremaybesomedocumentformattingcontrolwords(describedas
<docfmt>inthesyntaxdescription.).Thesecontrolwordsspecifytheattributesofthedocument,suchas
marginsandfootnoteplacement.Theseattributesmustprecedethefirstplaintextcharacterinthe
document.
RichTextFormatSpecificationv.1.2 Page14

Thecontrolwordsthatspecifydocumentformattingarelistedinthefollowingtable(measurementsarein
twips).Foromittedcontrolwords,RTFusesthedefaultvalues:
Controlword Meaning
\ deftabN
Defaulttabwidthintwips(defaultis720).
\ hyphhotzN
Hyphenationhotzoneintwips(amountofspaceattherightmargininwhich
wordsarehyphenated).
\ hyphconsecN
Nisthemaximumnumberofconsecutivelinesthatwillbeallowedtoendina
hyphen.0meansnolimit.
\ hyphcaps
Toggleshyphenationofcapitalizedwords(defaultison).Appendwith1orleave
keywordbyitselftotogglepropertyon;append0(zero)toturnitoff.
\ hyphauto
Togglesautomatichyphenation(defaultisoff).Appendwith1orleavekeyword
byitselftotogglepropertyon;append0(zero)toturnitoff.
\ linestartN
Beginninglinenumber(defaultis1).
\ fracwidth
Usesfractionalcharacterwidthswhenprinting(QuickDrawonly).
\ *\ nextfile
Destination;theargumentisthenameofthefiletoprintorindexnext;mustbe
enclosedinbraces.Thisisadestinationcontrolword.
\ *\ template
Destination;theargumentisthenameofarelatedtemplatefile;mustbeenclosed
inbraces.Thisisadestinationcontrolword.
\ makebackup
Backupcopyismadeautomaticallywhenthedocumentissaved.
\ defformat
TellstheRTFreaderthatthedocumentshouldbesavedinRTFformat.
\ psover
PrintsPostScriptoverthetext.
\ doctemp
Documentisaboilerplatedocument.ForWordforWindows,thisisatemplate,for
WordfortheMacintoshthisisastationeryfile.
\ deflangN
Definesthedefaultlanguageusedinthedocumentusedwitha\ plain.Seethe

section"CharacterFormattingProperties"foralistofpossiblevaluesforN.
Footnotesandendnotes
\ fetN
Footnote/endnotetype.Thisindicateswhattypeofnotesarepresentinthe
document.
0 Footnotesonlyornothingatall(default).
1 Endnotesonly.
2 Footnotesandendnotesboth.
Forbackwardscompatibility,if\ fet1isemitted,\ endnotesor\ enddocwillbe

emittedalongwith\ aendnotesor\ aenddoc.Readersthatunderstand\ fetwill


needtoignorethefootnotepositioningkeywords,andusetheendnotekeywords
instead.
\ ftnsep
Textargumentseparatesfootnotesfromthedocument.Thisisadestinationcontrol
word.
\ ftnsepc
Textargumentseparatescontinuedfootnotesfromthedocument.Thisisa
destinationcontrolword.
\ ftncn
Textargumentisanoticeforcontinuedfootnotes.Thisisadestinationcontrol
word.
\ aftnsep
Textargumentseparatesendnotesfromthedocument.Thisisadestinationcontrol
word.
\ aftnsepc
Textargumentseparatescontinuedendnotesfromthedocument.Thisisa
RichTextFormatSpecificationv.1.2 Page15

destinationcontrolword.
\ aftncn
Textargumentisanoticeforcontinuedendnotes.Thisisadestinationcontrol
word.
\ endnotes
Footnotesattheendofthesection(default).
\ enddoc
Footnotesattheendofthedocument.
\ ftntj
Footnotesbeneathtext.
\ ftnbj
Footnotesatthebottomofthepage.
\ aendnotes
Positionendnotesatendofsection.(default)
\ aenddoc
Positionendnotesatendofdocument.
\ aftnbj
Positionendnotesatbottomofpage(bottomjustified).
\ aftntj
Positionendnotesbeneathtext(topjustified).
\ ftnstartN
Beginningfootnotenumber(defaultis1).
\ aftnstartN
Beginningendnotenumber(defaultis1).
\ ftnrstpg
Restartfootnotenumberingeachpage.
\ ftnrestart
Footnotenumbersrestartateachsection.MicrosoftWordfortheMacintoshuses
thiscontroltorestartfootnotenumberingateachpage.
\ ftnrstcont
Continuousfootnotenumbering.(default)
\ aftnrestart
Restartendnotenumberingeachsection.
\ aftnrstcont
Continuousendnotenumbering(default).
\ ftnnar
FootnotenumberingArabicnumbering(1,2,3,)
\ ftnnalc
FootnotenumberingAlphabeticlowercase(a,b,c,)
\ ftnnauc
FootnotenumberingAlphabeticuppercase(A,B,C,)
\ ftnnrlc
FootnotenumberingRomanlowercase(i,ii,iii,)
\ ftnnruc
FootnotenumberingRomanuppercase(I,II,III,)
\ ftnnchi
FootnotenumberingChicagoManualofStyle(*,_,_,)
\ aftnnar
EndnotenumberingArabicnumbering(1,2,3,)
\ aftnnalc
EndnotenumberingAlphabeticlowercase(a,b,c,)
\ aftnnauc
EndnotenumberingAlphabeticuppercase(A,B,C,)
\ aftnnrlc
EndnotenumberingRomanlowercase(i,ii,iii,)
\ aftnnruc
EndnotenumberingRomanuppercase(I,II,III,)
\ aftnnchi
EndnotenumberingChicagoManualofStyle(*,_,_,)
Pageinformation
\ paperwN
Paperwidthintwips(defaultis12,240).
\ paperhN
Paperheightintwips(defaultis15,840).
\ pszN
Usedtodisambiguatebetweenpapersizeswithidenticaldimensionsunder
WindowsNT.Values141correspondtopapersizesdefiendinDRIVINI.Hinthe
Windows3.1SDK(DMPAPER_values).Values>=42correspondtouserdefined
formsunderWindowsNT.
\ marglN
Leftmarginintwips(defaultis1,800).
RichTextFormatSpecificationv.1.2 Page16

\ margrN
Rightmarginintwips(defaultis1,800).
\ margtN
Topmarginintwips(defaultis1,440).
\ margbN
Bottommarginintwips(defaultis1,440).
\ facingp
Facingpages(activatesodd/evenheadersandgutters).
\ gutterN
Gutterwidthintwips(defaultis0).
\ margmirror
Switchesmargindefinitionsonleftandrightpages.
\ landscape
Landscapeformat.
\ pgnstartN
Beginningpagenumber(defaultis1).
\ widowctrl
Enablewidowandorphancontrol.
Linkedstyles
\ linkstyles
Updatedocumentstylesautomaticallybasedontemplate.
Compatibilityoptions
\ notabind
Don'taddautomatictabstopforhangingindent.
\ wraptrsp
Wraptrailingspacesontothenextline.
\ prcolbl
Printallcolorsasblack.
\ noextrasprl
Don'taddextraspacetolineheightforshowingraised/loweredcharacters.
\ nocolbal
Don'tbalancecolumns.
\ cvmme
Treatoldstyleescapedquotationmarks(\ ")ascurrentstyle("")inmailmerge

datadocuments.
\ sprstsp
Suppressextralinespacingattopofpage.Basically,thismeanstoignoreanyline
spacinglargerthanAutoatthetopofapage.
\ sprsspbf
Suppressspacebeforeparagraphpropertyafterhardpageorcolumnbreak.
\ otblrul
CombinetableborderslikeWordforMacintosh5.x.Contradictorytableborder
informationisresolvedinfavorofthefirstcell.
\ transmf
Metafilesareconsideredtransparent;don'tblanktheareabehindmetafiles.
\ swpbdr
Ifaparagraphhasaleftborder(notabox)andtheDifferentOddAndEvenor
MirrorMarginscheckboxisselected,Wordwillprinttheborderontherightfor
oddnumberedpages.
\ brkfrm
Showhard(manual)pagebreaksandcolumnbreaksinframes.
Forms
\ formprot
Thisdocumentisprotectedforforms.
\ allprot
Thisdocumenthasnounprotectedareas.
\ formshade
Thisdocumenthasformfieldshadingon.
\ formdisp
Thisdocumentcurrentlyhasaformsdropdownorcheckboxselected.
\ printdata
Thisdocumenthasprintformdataonlyon.
Revisionmarks
\ revprot
Thisdocumentisprotectedforrevisions.Theusercaneditthedocument,but
revisionmarkingcannotbedisabled.
\ revisions
Turnsonrevisionmarking.
\ revpropN
Argumentindicateshowrevisedtextwillbedisplayed:0fornopropertiesshown;
RichTextFormatSpecificationv.1.2 Page17

1forbold;2foritalic;3forunderline(default);4fordoubleunderline.
\ revbarN
Verticallinesmarkalteredtext,basedontheargument:0fornomarking;1forleft
margin;2forrightmargin;3foroutside(leftonleftpages,rightonrightpages;
default).
Annotations
\ annotprot
Thisdocumentisprotectedforannotations.Theusercannoteditthedocument,but
caninsertannotations.
Bidirectionalcontrols
\ rtldoc
ThisdocumentwillbeformattedtohaveArabicstylepagination.
\ ltrdoc
ThisdocumentwillhaveEnglishstylepagination.Thisisthedefault.

Notethatthethreedocumentprotectionskeywords(\ formprot,\ revprot,and\ annotprot)aremutually


exclusive;onlyoneofthethreecanapplytoanygivendocument.Also,thereiscurrentlynomethodfor
passingpasswordsinRTF,soanydocumentwhichassociatesapasswordwithaprotectionlevelwilllose
5 thepasswordprotectioninRTF.
Formoreinformationaboutbidirectioncontrols,seeBidirectionalWritingOrder,laterinthischapter.

Section Text
EachsectionintheRTFfilehasthefollowingsyntax:
<section> <secfmt>*<hdrftr>?<para>+( \ sect<section>)?

10 Section-Formatting Properties
Atthebeginningofeachsection,theremaybesomesectionformattingcontrolwords(describedas
<secfmt>inthesyntaxdescription).Thesecontrolwordsspecifysectionformattingproperties,which
applytothetextfollowingthecontrolword,withtheexceptionofthesectionbreakcontrolwords(those
beginningwith\ sbk).Sectionbreakcontrolwordsdescribethebreakprecedingthetext.Thesecontrol

15 wordscanappearanywhereinthesection,notjustatthestart.
Notethatifthe\sectdcontrolwordisnotpresent,thecurrentsectioninheritsallsectionpropertiesdefined
intheprevioussection.
Thesectionformattingcontrolwordsarelistedinthefollowingtable:
Controlword Meaning
\ sectd
Resettodefaultsectionproperties.
\ endnhere
Endnotesincludedinthesection.
\ binfsxnN
Nistheprinterbinusedforthefirstpageofthesection.Ifthiscontrolisnot
definedthenthefirstpageusesthesameprinterbinasdefinedbythe\ binsxnN

control.
\ binsxnN
Nistheprinterbinusedforthepagesofthesection.
\ dsN
Designatessectionstyle;ifasectionstyleisspecified,stylepropertiesmustbe
specifiedwiththesection.
\ sectunlocked
Thissectionisunlockedforforms.
Sectionbreak
\ sbknone
Nosectionbreak.
\ sbkcol
Sectionbreakstartsanewcolumn.
RichTextFormatSpecificationv.1.2 Page18

\ sbkpage
Sectionbreakstartsanewpage(default).
\ sbkeven
Sectionbreakstartsatanevenpage.
\ sbkodd
Sectionbreakstartsatanoddpage.
Columns
\ colsN
Numberofcolumnsfor"snaking"(defaultis1).
\ colsxN
Spacebetweencolumnsintwips(defaultis720).
\ colnoN
Columnnumbertobeformatted;usedtospecifyformattingforvariablewidth
columns.
\ colsrN
Spacetorightofcolumnintwips;usedtospecifyformattingforvariablewidth
columns.
\ colwN
Widthofcolumnintwips;usedtooverridethedefaultconstantwidthsettingfor
variablewidthcolumns.
\ linebetcol
Linebetweencolumns.
Linenumbering
\ linemodN
Linenumbermodulusamounttoincreaseeachlinenumber(defaultis1).
\ linexN
Distancefromthelinenumbertothelefttextmarginintwips(defaultis360).The
automaticdistanceis0.
\ linestartsN
Beginninglinenumber(defaultis1).
\ linerestart
Linenumbersrestartat\ linestartsvalue.

\ lineppage
Linenumbersrestartoneachpage.
\ linecont
Linenumberscontinuefromtheprecedingsection.
Pageinformation
\ pgwsxnN
Nisthepagewidthintwips.A\ sectdresetsthevaluetothatspecified

by\ paperwNinthedocumentproperties.

\ pghsxnN
Nisthepageheightintwips.A\ sectdresetsthevaluetothatspecified

by\ paperhNinthedocumentproperties.

\ marglsxnN
Nistheleftmarginofthepageintwips.A\ sectdresetsthevaluetothatspecified

by\ marglNinthedocumentproperties.

\ margrsxnN
Nistherightmarginofthepageintwips.A\ sectdresetsthevaluetothatspecified

by\ margrNinthedocumentproperties.

\ margtsxnN
Nistherightmarginofthepageintwips.A\ sectdresetsthevaluetothatspecified

by\ margrNinthedocumentproperties.

\ margbsxnN
Nisthetopmarginofthepageintwips.A\ sectdresetsthevaluetothatspecified

by\ margtNinthedocumentproperties.

\ guttersxnN
Nisthewidthoftheguttermarginforthesectionintwips.A\ sectdresetsthe

valuetothatspecifiedby\ gutterNfromthedocumentproperties.IfFacingPages

isturnedoff,thegutterwillbeaddedtotheleftmarginofallpages.IfFacing
Pagesisturnedon,thegutterwillbeaddedtotheleftsideofoddnumberedpages
andtherightsideofevennumberedpages.
\ lndscpsxn
Pageorientationisinlandscapeformat.Inordertomixportraitandlandscape
sectionswithinadocument,the\ landscapecontrolshouldnotbeusedsothatthe

defaultforasectionisportraitwhichmaybeoverriddenbythe\ lndscpsxncontrol.

\ titlepg
Firstpagehasaspecialformat.
RichTextFormatSpecificationv.1.2 Page19

\ headeryN
Headerisntwipsfromthetopofthepage(defaultis720).
\ footeryN
Footerisntwipsfromthebottomofthepage(defaultis720).
Pagenumbers
\ pgnstartsN
Beginningpagenumber(defaultis1).
\ pgncont
Continuouspagenumbering(default).
\ pgnrestart
Pagenumbersrestartat\ pgnstartsvalue.

\ pgnxN
Pagenumberisntwipsfromtherightmargin(defaultis720).
\ pgnyN
Pagenumberisntwipsfromthetopmargin(defaultis720).
\ pgndec
Pagenumberformatisdecimal.
\ pgnucrm
Pagenumberformatisuppercaseromannumeral.
\ pgnlcrm
Pagenumberformatislowercaseromannumeral.
\ pgnucltr
Pagenumberformatisuppercaseletter.
\ pgnlcltr
Pagenumberformatislowercaseletter.
\ pgnhnN
Indicateswhichheadingleveltoprependtothepagenumber.0specifiestonot
showheadinglevel(default).Values19correspondtoheadinglevels1through9.
Thisisadestinationcontrolword.
\ pgnhnsh
Hyphenseparatorcharacter.
\ pgnhnsp
Periodseparatorcharacter.
\ pgnhnsc
Colonseparatorcharacter.
\ pgnhnsm
Emdashseparatorcharacter.
\ pgnhnsn
Endashseparatorcharacter.
\ pnseclvlN
Usedformultilevellists.Thispropertysetsthedefaultnumberingstyleforeach
corresponding\ pnlvlN(bulletsandnumberingpropertyforparagraphs)withinthat

section.Thisisadestinationcontrolword.
Verticalalignment
\ vertalt
Textistopaligned(default).
\ vertalb
Textisbottomaligned.
\ vertalc
Textiscenteredvertically.
\ vertalj
Textisjustifiedvertically.
Bidirectionalcontrols
\ rtlsect
Thissectionwillthreadcolumnsfromrighttoleft.
\ ltrsect
Thissectionwillthreadcolumnsfromlefttoright.Thisisthedefault.

Headers and Footers


HeadersandfootersareRTFdestinations.Eachsectioninthedocumentmayhaveitsownsetofheaders
andfooters.Ifnoheadersorfootersaredefinedforagivensection,theheadersandfootersfromthe
5 previoussection(ifany)areused.Thesyntaxforheadersandfootersareasfollows:
<hdrftr> '{'<hdrctl><para>+'}'<hdrftr>?
<hdrctl> \ header|\ footer|\ headerl|\ headerr|\ headerf|\ footerl|\ footerr|\ footerf

RichTextFormatSpecificationv.1.2 Page20

Notethateachseparate<hdrftr>groupmusthaveadistinct<hdrctl>introducingit.
Controlword Meaning
\ header
Headeronallpages.Thisisadestinationcontrolword.
\ footer
Footeronallpages.Thisisadestinationcontrolword.
\ headerl
Headeronleftpagesonly.Thisisadestinationcontrolword.
\ headerr
Headeronrightpagesonly.Thisisadestinationcontrolword.
\ headerf
Headeronfirstpageonly.Thisisadestinationcontrolword.
\ footerl
Footeronleftpagesonly.Thisisadestinationcontrolword.
\ footerr
Footeronrightpagesonly.Thisisadestinationcontrolword.
\ footerf
Footeronfirstpageonly.Thisisadestinationcontrolword.

The\ headerl,\ headerr,\ footerland\ footerrcontrolwordsareusedinconjunctionwiththe\ facingp


controlword,andthe\ headerfand\ footerfcontrolwordsareusedinconjunctionwiththe\ titlepgcontrol


5 word.ManyRTFreaderswillnotfunctioncorrectlyiftheappropriatedocumentpropertiesarenotset.In
particular,if\facingpisnotset,thenonly\headerand\footershouldbeused;if\facingpisset,thenonly
\headerl,\headerr,\footerl,and\footerrshouldbeused.Youshouldnotuse\headertosettheheaders
forbothpageswhen\facingpisset.Youcanuse\headerfif\titlepgisnotset,butnoheaderwillappear.
Formoreinformation,see"DocumentFormattingProperties"and"SectionFormattingProperties".
10 Iftheprevioussectionhadafirstpageheaderorfooterandhad\ titlepgset,andthecurrentsectiondoes

not,thentheprevioussection'sfirstpageheaderorfooterisdisabled.Itisnot,howeverdestroyed;if
subsequentsectionshave\ titlepgset,thenthefirstpageheaderorfooterwillberestored.

Paragraph Text
Therearetwokindsofparagraphs:plainparagraphsandtableparagraphs.Atableisacollectionof
15 paragraphsandatablerowisacontinuoussequenceofparagraphspartitionedintocells.The\ intbl

paragraphformattingcontrolwordidentifiestheparagraphaspartofatable.Formoreinformation,see
"TableDefinitions".Thiscontrolisinheritedbetweenparagraphswhichdonothaveparagraphproperties
resetwitha\ pard.

<para> <textpar>|<row>
<textpar> <pn>?<brdrdef>?<parfmt>*<apoctl>*<tabdef>?<shading>?(\subdocument|
<char>+)( \ par<para>)?

<row> <tbldef><cell>+\ row

<cell> <textpar>+\ cell

20 Paragraph-Formatting Properties
Thesecontrolwords(describedas<parfmt>inthesyntaxdescription)specifygenericparagraphformatting
properties.Thesecontrolwordscanappearanywhereinthebodyoftheparagraph,notjustatthe
beginning.
Notethatifthe\pardcontrolwordisnotpresent,thecurrentparagraphinheritsallparagraphproperties
25 definedinthepreviousparagraph.
Theparagraphformattingcontrolwordsarelistedinthefollowingtable:
Controlword Meaning
\ pard
Resetstodefaultparagraphproperties.
RichTextFormatSpecificationv.1.2 Page21

\ sN
Designatesparagraphstyle;ifaparagraphstyleisspecified,stylepropertiesmust
bespecifiedwiththeparagraph.
\ hyphpar
Togglesautomatichyphenationfortheparagraph.Appendwith1orleave
keywordbyitselftotogglepropertyon;append0(zero)toturnitoff.
\ intbl
Paragraphispartofatable.
\ keep
Keepparagraphintact.
\ nowidctlpar
Nowidow/orphancontrol.Thisisaparagraphlevelpropertyandisusedto
overridethedocumentlevel\ widowctrl.

\ keepn
Keepparagraphwiththenextparagraph.
\ levelN
Nistheoutlineleveloftheparagraph.
\ noline
Nolinenumbering.
\ pagebb
Breakpagebeforetheparagraph.
\ sbys
Sidebysideparagraphs.
Alignment
\ ql
Leftaligned(default).
\qr Rightaligned.
\ qj
Justified.
\ qc
Centered.
Indentation
\ fiN
Firstlineindent(defaultis0).
\ liN
Leftindent(defaultis0).
\ riN
Rightindent(defaultis0).
Spacing
\ sbN
Spacebefore(defaultis0).
\ saN
Spaceafter(defaultis0).
\ slN
Spacebetweenlines:ifthiscontrolwordismissingorif\ s1000isused,theline

spacingisautomaticallydeterminedbythetallestcharacterintheline;ifnisa
positivevalue,usesthissizeonlyifitistallerthanthetallestcharacter(otherwise
usesthetallestcharacter);ifnisanegativevalue,usestheabsolutevalueofn,
evenifitisshorterthanthetallestcharacter.
\ slmultN
Linespacingmultiple;indicatesthatthecurrentlinespacingisamultipleof
"Single"linespacing.Thiskeywordcanonlyfollowthe\ slkeywordandworksin

conjunctionwithit.
0 "AtLeast"or"Exactly"linespacing.
1 Multiplelinespacing,relativeto"Single".
Subdocuments
\ subdocumentN
ThisindicatesthatasubdocumentinaMasterDocument/Subdocument
relationshipshouldoccurhere.Nrepresentsanindexintothefiletable.This
controlwordmustbetheonlyiteminaparagraph.
Bidirectionalcontrols
\ rtlpar
Textinthisparagraphwillbedisplayedwithrighttoleftprecedence.
RichTextFormatSpecificationv.1.2 Page22

\ ltrpar
Textinthisparagraphwillbedisplayedwithlefttorightprecedence.Thisisthe
default.

Tabs
Anyparagraphmayhaveitsownsetoftabs.Tabsmustfollowthissyntax:
<tabdef> (<tab>|<bartab>)+
<tab> <tabkind>?<tablead>?\ tx

<bartab> <tablead>?\ tb

<tabkind> \ tqr|\ tqc|\ tqdec


<tablead> \ tldot|\ tlhyph|\ tlul|\ tleq


Controlword Meaning
\ txN
Tabpositionintwipsfromtheleftmargin.
\ tqr
Flushrighttab.
\ tqc
Centeredtab.
\ tqdec
Decimaltab.
\ tbN
Bartabpositionintwipsfromtheleftmargin.
\ tldot
Leaderdots.
\ tlhyph
Leaderhyphens.
\ tlul
Leaderunderline.
\ tlth
Leaderthickline.
\ tleq
Leaderequalsign.
5
Bullets and Numbering
ToprovidecompatibilitywithexistingRTFreaders,allapplicationswiththeabilitytoautomaticallybullet
ornumberparagraphswillalsoemitthegeneratedtextasplaintextinthe\ pntextgroup.Thiswillallow

existingRTFreaderstocapturetheplaintext,andsafelyignoretheautonumberinstructions.Thisgroup
10 precedesallbulletedornumberedparagraphs,andwillcontainallthetextandformattingthatwouldbe
autogenerated.Itshouldprecedethe{\ *\ pn}destination,anditistheresponsibilityofRTFreadersthat

understandthe{\ *\ pn}destinationtoignorethe\ pntextgroup.


<pn> <pnseclvl>|<pnpara>
<pnseclvl> {\*'\pnseclvl<pndesc>'}'
<pnpara> <pntext><pnprops>
<pntext> '{'\pntext<char>'}'
<pnprops> \*'\pn<pnlevel><pndesc>'}'
<pnlevel> \pnlvl|\pnlvlblt|\pnlvlbody|\pnlvlcont
<pndesc> <pnnstyle>&<pnchrfmt>&<pntxtb>&<pntxta>&<pnfmt>
<pnnstyle> \pncard|\pndec|\pnucltr|\pnucrm|\pnlcltr|\pnlcrm|\pnord|\pnordt
<pnchrfmt> \pnf?&\pnfs?&\pnb?&\pni?&\pncaps?&\pnscaps?&<pnul>?&\pnstrike?
&\pncf?
RichTextFormatSpecificationv.1.2 Page23

<pnul> \pnul|\pnuld|\pnuldb|\pnulnone|\pnulw
<pnfmt> \pnnumonce?&\pnacross?&\pnindent?&\pnsp?&\pnprev?&<pnjust>?
&\pnstart?&\pnhang?&\pnrestart?
<pnjust> \pnqc|\pnql|\pnqr
<pntxtb> '{'\pntxtb#PCDATA'}'
<pntxta> '{'\pntxta#PCDATA'}'

Settingsmarkedwithanasteriskcanbeturnedoffbyappending0(zero)tothecontrolword.
Controlword Definition
\ pntext
Thisgroupprecedesallnumbered/bulletedparagraphs,andcontainsallautogenerated
textandformatting.Itshouldprecedethe{\ *\ pn}destination,anditisthe

responsibilityofRTFreadersthatunderstandthe{\ *\ pn}destinationtoignorethis

precedinggroup.Thisisadestinationcontrolword.
\ pn
Turnsonparagraphnumbering.Thisisadestinationcontrolword.
\ pnlvlN
Paragraphlevel,whereNisalevelfrom1to9.Defaultsetby\pnseclvlNsection
formattingproperty.
\ pnlvlblt
Bulletedparagraph(correspondstolevel11).Theactualcharacterusedforthebulletis
storedinthe\ pntxtbgroup.

\ pnlvlbody
Simpleparagraphnumbering(correspondstolevel10).
\ pnlvlcont
Continuenumbering,butdonotdisplaynumber(skipnumbering).
\ pnnumonce
Numbereachcellonlyonceinatable(defaultistonumbereachparagraphinatable).
\ pnacross
Numberacrossrows(Defaultistonumberdowncolumns).
\pnhang Paragraphusesahangingindent.
\ pnrestart
Restartnumberingaftereachsectionbreak.Notethatthiskeywordisonlyusedin
conjunctionwithHeadingNumbering(applyingmultilevelnumberingtoHeadingstyle
definitions).
\ pncard
Cardinalnumbering(One,Two,Three).
\ pndec
Decimalnumbering(1,2,3).
\ pnucltr
Uppercasealphabeticnumbering(A,B,C).
\ pnucrm
Uppercaseromannumbering(I,II,III).
\ pnlcltr
Lowercasealphabeticnumbering(a,b,c).
\ pnlcrm
Lowercaseromannumbering.(i,ii,iii).
\ pnord
Ordinalnumbering(1st,2nd,3rd).
\ pnordt
Ordinaltextnumbering(First,Second,Third).
\ pnb
Boldnumbering.*
\ pni
Italicnumbering.*
\ pncaps
AllCapsnumbering.*
\ pnscaps
SmallCapsnumbering.*
\ pnul
Continuousunderline.*
\ pnuld
Dottedunderline.
RichTextFormatSpecificationv.1.2 Page24

\ pnuldb
Doubleunderline.
\ pnulnone
Turnsoffunderlining.
\ pnulw
Wordunderline.
\ pnstrike
Strikethroughnumbering.*
\ pncfN
Foregroundcolorindexintocolortable.Defaultiszero.
\ pnfN
Fontnumber.
\ pnfsN
Fontsize(inhalfpoints).
\ pnindentN
Minimumdistancefrommargintobodytext.
\ pnspN
Distancefromnumbertexttobodytext.
\ pnprev
Usedformultilevellists.Includeinformationfrompreviouslevelinthislevel;for
example,1,1.1,1.1.1,1.1.1.1
\ pnqc
Centerednumbering.
\ pnql
Leftjustifiednumbering.
\ pnqr
Rightjustifiednumbering.
\ pnstartN
StartAtnumber.
\ pntxta
Textafter.Thisgroupcontainsthetextthatsucceedsthenumber.Thisisadestination
controlword.
\ pntxtb
Textbefore.Thisgroupcontainsthetextthatprecedesthenumber.Thisisadestination
controlword.

Notethatthereisalimitof32characterstotalforthesumoftextbeforeandtextafterforsimple
numbering.Mulilevelnumberinghasalimitof64characterstotalforthesumofalllevels.

Paragraph Borders
5 Paragraphbordershavethefollowingsyntax:
<brdrdef> (<brdrseg><brdr>)+
<brdrseg> \ brdrt|\ brdrb|\ brdrl|\ brdrr|\ brdrbtw|\ brdrbar|\ box

<brdr> <brdrk>\ brdrw?\ brsp?\ brdrcf?


<brdrk> \ brdrs|\ brdrth|\ brdrsh|\ brdrdb|\ brdrdot|\brdrdash|\ brdrhair


Controlword Meaning
\ brdrt
Bordertop.
\ brdrb
Borderbottom.
\ brdrl
Borderleft.
\ brdrr
Borderright.
\ brdrbtw
Consecutiveparagraphswithidenticalborderformattingareconsideredtobepartofa
singlegroupwiththeborderinformationapplyingtotheentiregroup.Inordertohave
bordersaroundindividualparagraphswithinthegroup,the\ brdrbtwcontrolmustbe

specifiedforthatparagraph.
\ brdrbar
Borderoutside(rightsideofoddnumberedpages,leftsideofevennumberedpages).
\ box
Borderaroundtheparagraph(boxparagraph).
\ brdrs
Singlethicknessborder.
RichTextFormatSpecificationv.1.2 Page25

\ brdrth
Doublethicknessborder.
\ brdrsh
Shadowedborder.
\ brdrdb
Doubleborder.
\ brdrdot
Dottedborder.
\brdrdash Dashedborder.
\ brdrhair
Hairlineborder.
\ brdrwN
Nisthewidthintwipsofthepenusedtodrawtheparagraphborderline.
\ brdrcfN
Nisthecoloroftheparagraphborder;specifiedasanindexintothecolortableinthe
RTFheader.
\ brspN
Spaceintwipsbetweenbordersandtheparagraph.

Paragraph Shading
Paragraphshadinghasthefollowingsyntax:
<shading> ( \ shading|<pat>)\ cfpat?\ cbpat?

<pat> \ bghoriz|\ bgvert|\ bgfdiag|\ bgbdiag|\ bgcross|\ bgdkhoriz|\ bgdkvert|


\ bgdkfdiag|\ bgdkbdiag|\ bgdkcross|\ bgdkdcross


Controlword Meaning
\ shadingN
Nistheshadingoftheparagraphinhundredthsofapercent.
\ bghoriz
Specifiesahorizontalbackgroundpatternfortheparagraph.
\ bgvert
Specifiesaverticalbackgroundpatternfortheparagraph.
\ bgfdiag
Specifiesaforwarddiagonalbackgroundpatternfortheparagraph( \ \ \ \ )

\ bgbdiag
Specifiesabackwarddiagonalbackgroundpatternfortheparagraph(//// ).

\ bgcross
Specifiesacrossbackgroundpatternfortheparagraph.
\ bgdcross
Specifiesadiagonalcrossbackgroundpatternfortheparagraph.
\ bgdkhoriz
Specifiesadarkhorizontalbackgroundpatternfortheparagraph.
\ bgdkvert
Specifiesadarkverticalbackgroundpatternfortheparagraph.
\ bgdkfdiag
Specifiesadarkforwarddiagonalbackgroundpatternfortheparagraph( \ \ \ \ )

\ bgdkbdiag
Specifiesadarkbackwarddiagonalbackgroundpatternfortheparagraph(//// ).

\ bgdkcross
Specifiesadarkcrossbackgroundpatternfortheparagraph.
\ bgdkdcross
Specifiesadarkdiagonalcrossbackgroundpatternfortheparagraph.
\ cfpatN
Nisthelinecolorofthebackgroundpattern,specifiedasanindexintothedocument's
colortable.
\ cbpatN
Nisthebackgroundcolorofthebackgroundpattern,specifiedasanindexintothe
document'scolortable.
5
Absolute-Positioned Objects and Frames
Thefollowingparagraphformattingcontrolwordsspecifythelocationofaparagraphonthepage.
RichTextFormatSpecificationv.1.2 Page26

Consecutiveparagraphswiththesameframeformattingareconsideredtobepartofthesameframe.In
orderfortwoframedparagraphstoappearatthesamepositiononapage,theymustbeseparatedbya
paragraphwithdifferent,ornoframeinformation.
Notethatifanyparagraphinatablerowhasanyofthesecontrolwordsspecified,thenallparagraphsinthe
5 tablerowmusthavethesamecontrolwordsspecified,eitherbyinheritingthepropertiesfromtheprevious
paragraphorbyrespecifyingthecontrols.
Paragraphpositioninghasthefollowingsyntax:
<apoctl> <framesize>&<horzpos>&<vertpos>&<txtwrap>&<dropcap>
<framesize> \ absw?&\ absh?

<horzpos> <hframe>&<hdist>
<vertpos> <vframe>&<vdist>
<txtwrap> \ nowrap?&\ dxfrtext?&\ dfrmtxtx?&\ dfrmtxty?

<dropcap> \dropcapli?&\dropcapt?
<hframe> \ phmrg?|\ phpg?|\ phcol?

<hdist> \ posx?|\ posnegx?|\ posxc?|\ posxi?|\ posxo?|\ posxl?|\ posxr?


<vframe> \ pvmrg?|\ pvpg?|\ pvpara?


<vdist> \ posy?|\ posnegy?|\ posyt?|\ posyil?|\ posyb?|\ posyc?


Controlword Meaning
\ abswN
Nisthewidthoftheframeintwips.
\ abshN
Nistheheightoftheframeintwips.Apositivenumberindicatestheminimum
heightoftheframeandanegativenumberindicatestheexactheightoftheframe.A
valueofzeroindicatesthattheheightoftheframeadjuststothecontentsofthe
frame.Thisisthedefaultforframeswherenoheightisgiven.
Horizontalposition
\ phmrg
Usethemarginasthehorizontalreferenceframe
\ phpg
Usethepageasthehorizontalreferenceframe
\ phcol
Usethecolumnasthehorizontalreferenceframe.Thisisthedefaultifnohorizontal
referenceframeisgiven.
\ posxN
Positionstheframentwipsfromtheleftedgeofthereferenceframe.
\ posnegxN
Sameas\ posx,butallowsarbitrarynegativevalues.

\ posxc
Centerstheframehorizontallywithinthereferenceframe.
\ posxi
Positionstheparagraphhorizontallyinsidethereferenceframe.
\ posxo
Positionstheparagraphhorizontallyoutsidethereferenceframe.
\ posxr
Positionstheparagraphtotherightwithinthereferenceframe.
\ posxl
Positionstheparagraphtotheleftwithinthereferenceframe.Thisisthedefaultifno
horizontalpositioninginformationisgiven.
Verticalposition
\ pvmrg
Positionsthereferenceframeverticallyrelativetothemargin.Thisisthedefaultif
noverticalframepositioninginformationisgiven.
\ pvpg
Positionsthereferenceframeverticallyrelativetothepage.
\ pvpara
Positionsthereferenceframeverticallyrelativetothetopofthetopleftcornerofthe
RichTextFormatSpecificationv.1.2 Page27

nextunframedparagraphintheRTFstream.
\ posyN
Positionstheparagraphntwipsfromthetopedgeofthereferenceframe.
\ posnegyN
Sameas\ posy,butallowsarbitrarynegativevalues.

\ posyil
Positionstheparagraphverticallytobeinline.
\ posyt
Positionstheparagraphatthetopofthereferenceframe.
\ posyc
Centerstheparagraphverticallywithinthereferenceframe.
\ posyb
Positionstheparagraphatthebottomofthereferenceframe.
Textwrapping
\ nowrap
PreventstextfromflowingaroundtheAPO.
\ dxfrtextN
Distanceintwipsofanabsolutepositionedparagraphfromtextinthemaintextflow
inalldirections.
\ dfrmtxtxN
Nisthehorizontaldistanceintwipsfromtextonbothsidesoftheframe.
\ dfrmtxtyN
Nistheverticaldistanceintwipsfromtextonbothsidesoftheframe.
Dropcaps
\ dropcapliN
Numberoflinesdropcapistooccupy.Rangeis1through10.
\ dropcaptN
Typeofdropcap:
1 Intextdropcap.
2 Margindropcap.

Thefollowingisanexampleofabsolutepositionedtextinadocument:
\par\pard\pvpg\phpg\posxc\posyt\absw5040\dxfrtest173FirstAPOpara
\par\pard\phmrg\posxo\posyc\dxfrtext1152SecondAPOpara
5

Table Definitions
ThereisnoRTFtablegroup;instead,tablesarespecifiedasparagraphproperties.Atableisrepresentedas
asequenceoftablerows.Atablerowisacontinuoussequenceofparagraphspartitionedintocells.The
tablerowbeginswiththe\ trowdcontrolwordandendswiththe\ rowcontrolword.Everyparagraphthat

10 iscontainedinatablerowmusthavethe\ intblcontrolwordspecifiedorinheritedfromtheprevious

paragraph.Acellmayhavemorethanoneparagraphinit;thecellisterminatedbyacellmark(the\ cell

controlword),andtherowisterminatedbyarowmark(the\ rowcontrolword).Tablerowscanalsobe

absolutelypositioned.Inthiscase,everyparagraphinatablerowmusthavethesamepositioningcontrols
(seethe<apoctl>controlsinAbsolutePositionedObjectsandFrames).Tablepropertiesmaybe
15 inheritedfromthepreviousrow;therefore,aseriesoftablerowsmaybeintroducedbyasingle<tbldef>.
AnRTFtablerowhasthefollowingsyntax,asshowninthegeneralparagraphtextsyntaxgivenearlier.
<row> <tbldef><cell>+\ row

<cell> <textpar>+\ cell

Atabledefinitionhasthefollowingsyntax:
<tbldef> \ trowd\ trgaph<rowjust>?&<rowwrite>?&\ trleft?\trheader?&\trkeep?

<celldef>+
<rowjust> \ trql|\ trqr|\ trqc

<celldef> ( \ clmgf?&\ clmrg?<celltop>?&<cellleft>?&<cellbot>?&<cellright>?&



RichTextFormatSpecificationv.1.2 Page28

<cellshad>?)\ cellx

<celltop> \ clbrdrt<brdr>

<cellleft> \ clbrdrl<brdr>

<cellbot> \ clbrdrb<brdr>

<cellright> \ clbrdrr<brdr>

<cellshad> <cellpat>?\ clcfpat?&\ clcbpat?&\ clshdng


<cellpat> \ clbghoriz|\ clbgvert|\ clbgfdiag|\ clbgbdiag|\ clbgcross|\ clbgdkhor|\ clbgdkvert


|\ clbgdkfdiag|\ clbgdkbdiag|\ clbgdkcross|\ clbgdkdcross


<rowwrite> \ ltrrow|\ rtlrow


Notefor<tbldef>thatthenumberofcellxsmustmatchthenumberof\cellsinthe\row.
Thefollowingcontrolwordsfurtherdefineoptionsforeachrowofthetable:
Controlword Meaning
\ trowd
Setstablerowdefaults.
\ trgaphN
Halfthespacebetweenthecellsofatablerowintwips.
\ cellxN
Definestherightboundaryofatablecell,includingitshalfofthespacebetween
cells.
\ clmgf
Thefirstcellinarangeoftablecellstobemerged.
\ clmrg
Contentsofthetablecellaremergedwiththoseoftheprecedingcell.
Rowformatting
\ trql
Leftjustifiesatablerowwithrespecttoitscontainingcolumn.
\ trqr
Rightjustifiesatablerowwithrespecttoitscontainingcolumn.
\ trqc
Centersatablerowwithrespecttoitscontainingcolumn.
\ trleftN
Positionoftheleftmostedgeofthetablewithrespecttotheleftedgeofitscolumn.
\ trrhN
Heightofatablerowintwips;when0,theheightissufficientforallthetextinthe
line;whenpositive,theheightisguaranteedtobeatleastthespecifiedheight;
whennegative,theabsolutevalueoftheheightisused,regardlessoftheheightof
thetextintheline.
\ trhdr
Tablerowheader;thisrowshouldappearatthetopofeverypagethecurrenttable
appearson.
\ trkeep
Tablerowkeep;thisrowcannotbesplitbyapagebreak.Thispropertyisassumed
offunlessthekeywordispresent.
Bidirectionalcontrols
\ rtlrow
Cellsinthistablerowwillhaverighttoleftprecedence.
\ ltrrow
Cellsinthistablerowwillhaverighttoleftprecedence.Thisisthedefault.
Rowborders
\ trbrdrt
Tablerowbordertop.
\ trbrdrl
Tablerowborderleft.
\ trbrdrb
Tablerowborderbottom.
\ trbrdrr
Tablerowborderright.
RichTextFormatSpecificationv.1.2 Page29

\ trbrdrh
Tablerowborderhorizontal(inside).
\ trbrdrv
Tablerowbordervertical(inside).
Cellborders
\ clbrdrb
Bottomtablecellborder.
\ clbrdrt
Toptablecellborder.
\ clbrdrl
Lefttablecellborder.
\ clbrdrr
Righttablecellborder.
Cellshadingand
backgroundpattern
\ clshdngN
Nistheshadingofatablecellinhundredthsofapercent.Thiscontrolshouldbe
includedinRTFalongwithcellborderinformation.
\ clbghoriz
Specifiesahorizontalbackgroundpatternforthecell.
\ clbgvert
Specifiesaverticalbackgroundpatternforthecell.
\ clbgfdiag
Specifiesaforwarddiagonalbackgroundpatternforthecell( \ \ \ \ )

\ clbgbdiag
Specifiesabackwarddiagonalbackgroundpatternforthecell(//// ).

\ clbgcross
Specifiesacrossbackgroundpatternforthecell.
\ clbgdcross
Specifiesadiagonalcrossbackgroundpatternforthecell.
\ clbgdkhor
Specifiesadarkhorizontalbackgroundpatternforthecell.
\ clbgdkvert
Specifiesadarkverticalbackgroundpatternforthecell.
\ clbgdkfdiag
Specifiesadarkforwarddiagonalbackgroundpatternforthecell( \ \ \ \ )

\ clbgdkbdiag
Specifiesadarkbackwarddiagonalbackgroundpatternforthecell(//// ).

\ clbgdkcross
Specifiesadarkcrossbackgroundpatternforthecell.
\ clbgdkdcross
Specifiesadarkdiagonalcrossbackgroundpatternforthecell.
\ clcfpatN
Nisthelinecolorofthebackgroundpattern.
\ clcbpatN
Nisthebackgroundcolorofthebackgroundpattern.

Thefollowingisanexampleoftabletext:
\par\trowd\trqc\trgaph108\trrh280\trleft36
\clbrdrt\brdrth\clbrdrl\brdrth\clbrdrb\brdrdb
5 \clbrdrr\brdrdb\cellx3636\clbrdrt\brdrth
\clbrdrl\brdrdb\clbrdrb\brdrdb\clbrdrr\brdrdb
\cellx7236\clbrdrt\brdrth\clbrdrl\brdrdb
\clbrdrb\brdrdb\clbrdrr\brdrdb\cellx10836\pard\intbl
\cell\pard\intbl\cell\pard\intbl\cell\pard\intbl\row
10 \trowd\trqc\trgaph108\trrh280\trleft36\clbrdrt\brdrdb
\clbrdrl\brdrth\clbrdrb\brdrsh\brdrs\clbrdrr\brdrdb
\cellx3636\clbrdrt\brdrdb\clbrdr\brdrdb
\clbrdrb\brdrsh\brdrs\clbrdrr\brdrdb
\cellx7236\clbrdrt\brdrdb\clbrdr\brdrdb
15 \clbrdrb\brdrsh\brdrs\clbrdrr\brdrdb\cellx10836\pard
\intbl\cell\pard\intbl\cell\pard\intbl\cell\pard
\intbl\row\pard

Character Text
20 Charactertexthasthefollowingsyntax:
RichTextFormatSpecificationv.1.2 Page30

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

Character-Formatting Properties
Thesecontrolwords(describedas<chrfmt>inthesyntaxdescription)changecharacterformatting
properties.Acontrolwordprecedingplaintextturnsonthespecifiedattribute.Somecontrolwords
5 (indicatedinthefollowingtablebyanasteriskfollowingthedescription)canbeturnedoffbythecontrol
wordfollowedby0(zero).Forexample,\ bturnsonbold,while\ b0turnsoffbold.

Thecharacterformattingcontrolwordsarelistedinthefollowingtable:
Controlword Meaning
\ plain
Resetcharacterformattingpropertiestoadefaultvaluedefinedbytheapplication.The
associatedcharacterformattingproperties(describedinthesection"AssociatedCharacter
Properties")arealsoreset.
\b
Bold*
\ caps
Allcapitals*
\ deleted
Marksthetextasdeletionrevisionmarked*
\ dnN
Subscriptpositioninhalfpoints(defaultis6)
\ sub
Subscriptstextandshrinkspointsizeaccordingtofontinformation.
\ nosupersub
Turnsoffsuperscriptingorsubscripting.
\ expndN
Expansionorcompressionofthespacebetweencharactersinquarterpoints;anegative
valuecompresses(defaultis0)
\ expndtwN
Expansionorcompressionofthespacebetweencharactersintwips;anegativevalue
compresses.Forbackwardscompatibility,both\ expndtwand\ expndshouldbeemitted.

\ kerningN
Pointsize(inhalfpoints)abovewhichtokerncharacterpairs.\ kerning0turnsoff

kerning.
\ fN
Fontnumber
\ fsN
Fontsizeinhalfpoints(defaultis24)
\i
Italic*
\ outl
Outline*
\ revised
Texthasbeenaddedsincerevisionmarkingwasturnedon
\ revauthN
Indexintotherevisiontable.ThecontentoftheNthgroupintherevisiontableis
consideredtobetheauthorofthatrevision.
\ revdttmN
Timeoftherevision.The32bitDTTMstructureisemittedasalonginteger.
\ scaps
Smallcapitals*
\ shad
Shadow*
\ strike
Strikethrough*
\ ul
Continuousunderline.\ ul0turnsoffallunderlining

\ uld
Dottedunderline
\ uldb
Doubleunderline
RichTextFormatSpecificationv.1.2 Page31

\ ulnone
Stopsallunderlining
\ ulw
Wordunderline
\ upN
Superscriptpositioninhalfpoints(defaultis6)
\ super
Superscriptstextandshrinkspointsizeaccordingtofontinformation.
\v
Hiddentext*
\ cfN
Foregroundcolor(defaultis0)
\ cbN
Backgroundcolor(defaultis0)
\ rtlch
Thecharacterdatafollowingthiscontrolwordwillbetreatedasarighttoleftrun.
\ ltrch
Thecharacterdatafollowingthiscontrolwordwillbetreatedasalefttorightrun.Thisis
thedefault.
\ csN
Designatescharacterstyle;ifacharacterstyleisspecified,stylepropertiesmustbe
specifiedwiththecharacterrun.
\ cchsN
Indicatesanycharactersnotbelongingtothedefaultdocumentcharactersetandwhich
charactersettheydobelongto.Macintoshcharactersetsarerepresentedbyvalues
greaterthan255.ThevaluesforNcorrespondtothevaluesforthe\ fcharsetkeyword.

\ langN
Appliesalanguagetoacharacter.Nisanumbercorrespondingtoalanguage.A\ plain

resetsthelanguagepropertytothelanguagedefinedby\ deflangNinthedocument

properties.

ThefollowingtabledefinesthestandardlanguagesusedbyMicrosoft.Thistablewasgeneratedbythe
UnicodegroupforusewithTrueTypeandUnicode.
Languagename LanguageID
NoLanguage 0x0400
Albanian 0x041c
Arabic 0x0401
Bahasa 0x0421
BelgianDutch 0x0813
BelgianFrench 0x080c
BrazilianPortuguese 0x0416
Bulgarian 0x0402
Catalan 0x0403
CroatoSerbian 0x041a
(Latin)
Czech 0x0405
Danish 0x0406
Dutch 0x0413
English(Aus.) 0x0c09
English(UK) 0x0809
English(US) 0x0409
Finnish 0x040b
French 0x040c
French(Canadian) 0x0c0c
RichTextFormatSpecificationv.1.2 Page32

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
RhaetoRomanic 0x0417
Romanian 0x0418
Russian 0x0419
SerboCroatian 0x081a
(Cyrillic)
SimplifiedChinese 0x0804
Slovak 0x041b
Spanish(Castilian) 0x040a
Spanish(Mexican) 0x080a
Swedish 0x041d
SwissFrench 0x100c
SwissGerman 0x0807
SwissItalian 0x0810
Thai 0x041e
TraditionalChinese 0x0404
Turkish 0x041f
Urdu 0x0420

Toreadnegative\ expndvaluesfromWordfortheMacintosh,anRTFreadershoulduseonlythelow

order6bitsofthevalueread.WordfortheMacintoshdoesnotemitnegativevaluesfor\ expnd.Instead,it

treatsvaluesfrom57through63as7through1,respectively(theloworder6bitsof57through63are
5 thesameas7through1).

Associated Character Properties


BidirectionalawaretextprocessorsoftenneedtoassociateaLatin(orotherlefttoright)fontwithan
ArabicorHebrew(orotherrighttoleft)font.Theassociationisneededtomatchcommonlyusedpairsof
fontsinname,sizeandotherattributes.WhileRTFdefinesabroadvarietyofassociatedcharacter
10 properties,anyimplementationmaychoosetonotimplementaparticularassociatedcharacterpropertyand
sharethepropertybetweentheLatinandArabicfonts.
Propertyassociationusesthefollowingsyntax:
RichTextFormatSpecificationv.1.2 Page33

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

<rtlrun> \ ltrch\ af&<aprops>*\ rtlch<ptext>


Herearesomeexamplesofpropertyassociation:
\ltrch\af2\ab\au\rtlch\uSampleText

5 Thisisarighttoleftrun.Textwillusethedefaultbidirectionalfont,andwillbeunderlined.Theleftto
rightfontassociatedwiththisrunisfont2(inthefonttable)withboldingandunderlining.
\plain\rtlch\ltrchSampleText

Thisisalefttorightrun.Therighttoleftfontandthelefttorightfontusethedefaultfont(specified
10 by\ deff).

\rtlch\af5\ab\ai\ltrch\uSampleText

Thisisalefttorightrun.Therighttoleftfontisfont5,boldanditalicized.Thelefttorightfontisthe
defaultfont,underlined.Ifthereaderdoesnotsupportunderliningintheassociatedfont,thenbothfonts
15 willbeunderlined.
Thepropertyassociationcontrolwords(describedas<aprops>inthesyntaxdescription)arelistedinthe
followingtable.Somecontrolwords(indicatedinthefollowingtablebyanasteriskfollowingthe
description)canbeturnedoffbythecontrolwordfollowedby0(zero).
Controlword Meaning
\ ab
AssociatedfontisBold*
\ acaps
AssociatedfontisAllcapitals*
\ acfN
AssociatedForegroundcolor(defaultis0)
\ adnN
AssociatedfontisSubscriptpositioninhalfpoints(defaultis6)
\ aexpndN
Expansionorcompressionofthespacebetweencharactersinquarterpoints;anegative
valuecompresses(defaultis0)
\ afN
AssociatedFontnumber(defaultis0)
\ afsN
AssociatedFontsizeinhalfpoints(defaultis24)
\ ai
AssociatedfontisItalic*
\ alangN
LanguageIDfortheAssociatedfont.(ThisusesthesamelanguageIDcodesdescribed
above.)
\ aoutl
AssociatedfontisOutline*
\ ascaps
AssociatedfontisSmallcapitals*
\ ashad
AssociatedfontisShadow*
\ astrike
AssociatedfontisStrikethrough*
\ aul
Associatedfontiscontinuousunderlined.\ aul0turnsoffallunderliningforthealternate

font.
\ auld
Associatedfontisdottedunderlined
\ auldb
Associatedfontisdoubleunderlined
\ aulnone
Associatedfontisnolongerunderlined.
\ aulw
Associatedfontiswordunderlined.
\ aupN
Superscriptpositioninhalfpoints(defaultis6)
RichTextFormatSpecificationv.1.2 Page34

Special Characters
TheRTFstandardincludescontrolwordsforspecialcharacters(describedas<spec>inthesyntax
description).IfaspecialcharactercontrolwordisnotrecognizedbytheRTFreader,itisignoredandthe
5 textfollowingitisconsideredplaintext.TheRTFspecificationisflexibleenoughtoallownewspecial
characterstobeaddedforinterchangewithothersoftware.
ThespecialRTFcharactersarelistedinthefollowingtable:
Controlword Meaning
\ chdate
Currentdate(asinheaders).
\ chdpl
Currentdateinlongformat,e.g.Thursday,October28,1993
\ chdpa
Currentdateinabbreviatedformat,e.g.Thu,Oct28,1993
\ chtime
Currenttime(asinheaders).
\ chpgn
Currentpagenumber(asinheaders).
\ sectnum
Currentsectionnumber(asinheaders).
\ chftn
Automaticfootnotereference(footnotesfollowinagroup).
\ chatn
Annotationreference(annotationtextfollowsinagroup).
\ chftnsep
Anchoringcharacterforfootnoteseparator.
\ chftnsepc
Anchoringcharacterforfootnotecontinuation.
\ cell
Endoftablecell.
\ row
Endoftablerow.
\ par
Endofparagraph.
\ sect
Endofsectionandparagraph.
\ page
Requiredpagebreak.
\ column
Requiredcolumnbreak.
\ line
Requiredlinebreak(noparagraphbreak).
\ softpage
Nonrequiredpagebreak.Emittedasitappearsingalleyview.
\ softcol
Nonrequiredcolumnbreak.Emittedasitappearsingalleyview.
\ softline
Nonrequiredlinebreak.Emittedasitappearsingalleyview.
\ softlheightN
Nonrequiredlineheight.Thisisemittedasaprefixtoeachline.
\ tab
Tabcharacter;sameasASCII9.
\ emdash
Emdash(longhyphen).
\ endash
Endash(shorthyphen).
\ emspace
Nonbreakingspaceequaltowidthofcharacter"m"incurrentfont.
\ enspace
Nonbreakingspaceequaltowidthofcharacter"n"incurrentfont.
\ bullet
Bulletcharacter.
\ lquote
Leftsinglequotationmark.
\ rquote
Rightsinglequotationmark.
\ ldblquote
Leftdoublequotationmark.
\ rdblquote
Rightdoublequotationmark.
RichTextFormatSpecificationv.1.2 Page35

\|
Formulacharacter.
\~
Nonbreakingspace.
\
Optionalhyphen.
\_
Nonbreakinghyphen.
\:
Specifiesasubentryinanindexentry.
\*
MarksadestinationwhosetextshouldbeignoredifnotunderstoodbytheRTFreader.
\ 'hh
Ahexadecimalvalue,basedonthespecifiedcharacterset(maybeusedtoidentify8bit
values).
\ ltrmark
Thefollowingcharactersshouldbedisplayedfromlefttoright;usuallyfoundatthestart
of\ltrchruns.
\ rtlmark
Thefollowingcharactersshouldbedisplayedfromrighttoleft;usuallyfoundatthestart
of\rtlchruns.
\ zwj
ZeroWidthJoiner.Thisisusedtoligatewords.
\ zwnj
ZeroWidthNonJoiner.Thisisusedforunligatingaword.

NotethatanASCII9isacceptedasatabcharacter.Acarriagereturn(charactervalue13)orlinefeed
(charactervalue10)willbetreatedasa\ parcontrolifthecharacterisprecededbyabackslash.Youmust

includethebackslashorRTFignoresthecontrolword.(Youmayalsowanttoinsertacarriagereturn/line
5 feedpairwithoutbackslashesatleastevery255charactersforbettertexttransmissionovercommunication
lines.)
Herearethecodevaluesforthefollowingspecialcharacters:
Keyword WordforWindowsandOS/2 AppleMacintosh
\ bullet
149 0xA5
\ endash
150 0xD1
\ emdash
151 0xD0
\ lquote
145 0xD4
\ rquote
146 0xD5
\ ldblquote
147 0xD2
\ rdblquote
148 0xD3

Bookmarks
10 Thisdestinationmayspecifyoneoftwocontrolwords:\ *\ bkmkstart,whichindicatesthestartofthe

specifiedbookmark,and\ *\ bkmkend,whichindicatestheendofthespecifiedbookmark.

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

<bookend> '{\ *'\ bkmkend#PCDATA'}'


Abookmarkisshowninthefollowingexample:
15 \pard\plain\fs20Kuhnbelievesthatscience,ratherthan
RichTextFormatSpecificationv.1.2 Page36

discoveringinexperiencecertainstructured
relationships,actuallycreates(oralreadyparticipatesin)
apresupposedstructuretowhichitfitsthedata.
{\bkmkstartparadigm}Kuhncallssuchapresupposed
5 structureaparadigm.{\bkmkendparadigm}

Thebookmarkstartandthebookmarkendarematchedviathebookmarktag.Intheexample,the
bookmarktagwasparadigm.Eachbookmarkstartshouldhaveamatchingbookmarkend;however,the
bookmarkstartandthebookmarkendmaybeinanyorder.
10 \ bkmkcolfNisusedtodenotethefirstcolumnofatablecoveredbyabookmark.Ifitisnotincludedthen

thefirstcolumnwillbeassumed.\ bkmkcollNisusedtodenotethelastcolumn.Ifitisnotusedthenthe

lastcolumnwillbeassumed.Thesecontrolsareusedwithinthe\ *\ bkmkstartdestinationfollowing

the\ bkmkstartcontrol.Forexample,{\ *\ bkmkstart\ bkmkcolf2\ bkmkcoll5Table1}willplacethe


bookmark"Table1"oncolumnstwothroughfiveofatable.

15 Pictures
AnRTFfilecanincludepicturescreatedwithotherapplications.Thesepicturescanbeinhexadecimal
(default)orbinaryformat.Picturesaredestinations,andbeginwiththe\ pictcontrolword.Apicture

destinationhasthefollowingsyntax:
<pict> '{'\ pict(<brdr>?&<shading>?&<picttype>&<pictsize>&<metafileinfo>?)<data>

'}'
<picttype> \ macpict|\ pmmetafile|\ wmetafile|\ dibitmap<bitmapinfo>|\ wbitmap<bitmapinfo>

<bitmapinfo> \ wbmbitspixel&\ wbmplanes&\ wbmwidthbytes


<pictsize> ( \ picw?&\ pich?)\ picscalex?&\ picscaley?&\ picscaled?&\ piccropt?&\ piccropb?


&\ piccropr?&\ piccropl?


<metafileinfo> \picbmp&\picbpp
<data> ( \ bin#BDATA)|#SDATA

20 Thesecontrolwordsaredescribedinthefollowingtable(somemeasurementsinthistableareintwips;a
twipisonetwentiethofapoint):
Controlword Meaning
\ macpict
SourceofthepictureisQuickDraw.
\ pmmetafileN
SourceofthepictureisanOS/2metafile;thenargumentidentifiesthemetafiletype.
\ wmetafileN
SourceofthepictureisaWindowsmetafile;thenargumentidentifiesthemetafile
type(defaultis1).
\ dibitmapN
SourceofthepictureisaWindowsDeviceIndependentbitmap;thenargument
identifiesthebitmaptype(defaultis0).
\ wbitmapN
SourceofthepictureisaWindowsDevicedependentbitmap;thenargument
identifiesthebitmaptype(defaultis0monochromebitmap).
Bitmapinformation
\ wbmbitspixelN
Numberofadjacentcolorbitsoneachplaneneededtodefineapixel(defaultis1)
\ wbmplanesN
Numberofbitmapcolorplanes(defaultis1).
\ wbmwidthbytesN
Specifiesthenumberofbytesineachrasterline.Thisvaluemustbeanevennumber
sincetheWindowsgraphicsdeviceinterface(GDI)assumesthatthebitvaluesofa
bitmapformanarrayofinteger(twobyte)values.Inotherwords,wbmwidthbytes
x8mustbethenextmultipleof16greaterthanorequaltothepicw(bitmapwidthin
pixels)value.
RichTextFormatSpecificationv.1.2 Page37

Picturesize,scaling,
andcropping
\ picwN
xExtfieldifthepictureisametafile;picturewidthinpixelsifthepictureisabitmap
orfromQuickDraw.
\ pichN
yExtfieldifthepictureisametafile;pictureheightinpixelsifthepictureisabitmap
orfromQuickDraw.
\ picwgoalN
Desiredwidthofthepictureintwips.
\ pichgoalN
Desiredheightofthepictureintwips.
\ picscalexN
Horizontalscalingvalue;thenargumentisavaluerepresentingapercentage(default
is100).
\ picscaleyN
Verticalscalingvalue;thenargumentisavaluerepresentingapercentage(defaultis
100).
\ picscaled
Scalesthepicturetofitwithinthespecifiedframe;usedonlywith\ macpictpictures.

\ piccroptN
Topcroppingvalueintwips;apositivevaluecropstowardthecenterofthepicture;
anegativevaluecropsawayfromthecenter,addingaspaceborderaroundpicture
(defaultis0).
\ piccropbN
Bottomcroppingvalueintwips;apositivevaluecropstowardthecenterofthe
picture;anegativevaluecropsawayfromthecenter,addingaspaceborderaround
picture(defaultis0).
\ piccroplN
Leftcroppingvalueintwips;apositivevaluecropstowardthecenterofthepicture;
anegativevaluecropsawayfromthecenter,addingaspaceborderaroundpicture
(defaultis0).
\ piccroprN
Rightcroppingvalueintwips;apositivevaluecropstowardthecenterofthepicture;
anegativevaluecropsawayfromthecenter,addingaspaceborderaroundpicture
(defaultis0).
Metafileinformation
\ picbmp
Specifieswhetherametafilecontainsabitmap.
\ picbppN
Specifiesthebitsperpixelinametafilebitmap.Validrangeis132,with1,4,8,
and24beingrecognized.
Picturedata
\ binN
Pictureisinbinaryformat;thenumericparameternisthenumberofbytesthat
follow.Unlikeallothercontrols,thiskeywordtakesa32bitparameter.

The\ wbitmapcontrolwordisoptional;ifnootherpicturetypeisspecified,thepictureisassumedtobea

Windowsbitmap.If\ wmetafileisspecified,thenargumentcanbeoneofthefollowingtypes:

Type nargument
MM_TEXT 1
MM_LOMETRIC 2
MM_HIMETRIC 3
MM_LOENGLISH 4
MM_HIENGLISH 5
MM_TWIPS 6
MM_ISOTROPIC 7
MM_ANISOTROPIC 8
RichTextFormatSpecificationv.1.2 Page38

Formoreinformationaboutthesetypes,seeVolume1oftheProgrammersReferenceintheMicrosoft
Windows3.1SDK.
If\ pmmetafileisspecified,thenargumentcanbeoneofthefollowingtypes:

Type nargument
PU_ARBITRARY 0x0004
PU_PELS 0x0008
PU_LOMETRIC 0x000C
PU_HIMETRIC 0x0010
PU_LOENGLISH 0x0014
PU_HIENGLISH 0x0018
PU_TWIPS 0x001C
5
Formoreinformationaboutthesetypes,seeVolume2oftheOS/2ProgrammersReference.
Becarefulwithspacesfollowingcontrolwordswhendealingwithpicturesinbinaryformat.Whenreading
files,RTFconsidersthefirstspaceafteracontrolwordthedelimiterandsubsequentspacespartofthe
documenttext.Therefore,anyextraspacesareattachedtothepicture,withunpredictableresults.
10 RTFwritersshouldnotusethecarriagereturn/linefeed(CRLF)combinationtobreakuppicturesinbinary
format.Iftheydo,theCRLFistreatedasliteraltextandconsideredpartofthepicturedata.
Thepictureinhexadecimalorbinaryformatfollowsthepicturedestinationcontrolwords.Thefollowing
exampleillustratesthedestinationformat:
{\pict\wbitmap0\picw170\pich77\wbmbitspixel1\wbmplanes1\wmbwidthbytes22
15 \picwgoal505
\pichgoal221
\picscalex172
\picscaley172
49f2000000000273023d1101a030
20 3901000a000000000273023d98
0048000200000275
02040000200010275023e000000000
273023d000002b90002b90002
b90002b90002b9
25 0002b90002b90002b90002b90002b90002
b92222b90002b90002b90
002b90002b9
0002b90002b90002b90002b9000

30 Objects
MicrosoftOLELinks,MicrosoftOLEEmbeddedObjects,andMacintoshEditionManagerSubscriber
ObjectsarerepresentedinRTFasobjects.Objectsaredestinationsthatcontainadatapartandaresultpart.
Thedatapartisgenerallyhiddentotheapplicationthatproducedthedocument.Aseparateapplicationuses
thedataandsuppliestheappearanceofthedata.Thisappearanceistheresultpartoftheobject.
35 TherepresentationofobjectsinRTFisdesignedtoallowRTFreadersthatdon'tunderstandobjectsordon't
useaparticulartypeofobjecttousethecurrentresultinplaceoftheobject.Thisallowstheappearanceof
theobjecttobemaintainedthroughtheconversioneventhoughtheobjectfunctionalityislost.Eachobject
comeswithoptionalinformationabouttheobject,arequireddestinationthatcontainstheobjectdata,and
anoptionalresultthatcontainsthecurrentappearanceoftheobject.ThisresultcontainsstandardRTF.Itis
40 animportantresponsibilityoftheRTFwritertoprovidetheresultsothatexistingRTFreadersthateither
donotsupportobjectsorthatdonotsupporttheparticulartypeofobjectwillbeabletodisplaytheobject.
RichTextFormatSpecificationv.1.2 Page39

WhentheobjectisanOLEembeddedorlinkedobject,thedatapartoftheobjectisthestructureproduced
bytheOLESaveToStreamfunction.SomeOLEclientsrelyontheOLEsystemtorendertheobjectanda
copyoftheresultisnotavailabletotheRTFwriterforthatapplication.Forthesecases,theobjectresult
maybeextractedfromthestructureproducedbytheOLESaveToStreamfunction.Forinformationabout
5 theOLESaveToStreamfunction,seetheMicrosoftObjectLinkingandEmbeddingSDK.
Thesyntaxforthisdestinationis:
<obj> ('{'\ object(<objtype>&<objmod>?&<objclass>?&<objname>?&<objtime>?&

<objsize>?&<rsltmod>?)<objdata><result>'}')|<pubobject>
<objtype> \ objemb|\ objlink|\ objautlink|\ objsub|\ objpub|\ objicemb

<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>+'}'


Controlword Meaning
Objecttype
\ objemb
AnobjecttypeofOLEembeddedobject.Ifnotypeisgivenfortheobjectthenthe
objectisassumedtobeoftype\ objemb.

\ objlink
AnobjecttypeofOLElink
\ objautlink
AnobjecttypeofOLEautolink
\ objsub
AnobjecttypeofMacintoshEditionManagerSubscriber
\ objpub
AnobjecttypeofMacintoshEditionManagerPublisher
\ objicemb
AnobjecttypeofMSWordfortheMacintoshICEmbedder
Objectinformation
\ linkself
Theobjectisalinktoanotherpartofthesamedocument.
\ objlock
Lockstheobjectfromanyupdates.
\ objupdate
Forceanupdatetotheobjectbeforedisplayingit.
\ objclass
Thetextargumentistheobjectclasstouseforthisobject;ignoretheclassspecified
intheobjectdata.Thisisadestinationcontrolword.
\ objname
Thetextargumentisthenameofthisobject.Thisisadestinationcontrolword.
\ objtime
Describesthetimethattheobjectwaslastupdated.
RichTextFormatSpecificationv.1.2 Page40

Objectsize,position,
cropping,andscaling
\ objhN
Nistheoriginalobjectheightintwips,assumingtheobjecthasagraphical
representation.
\ objwN
Nistheoriginalobjectwidthintwips,assumingtheobjecthasagraphical
representation.
\ objsetsize
Forcestheobjectservertosettheobject'sdimensionstothatspecifiedbytheclient
\ objalignN
Nisthedistanceintwipsfromtheleftedgeoftheobjectsthatshouldbealignedona
tabstop.ThiswillbeneededtoplaceMathTypeequationscorrectlyinline.
\ objtransyN
Nisthedistanceintwipstheobjectsshouldbemovedverticallywithrespecttothe
baseline.ThiswillbeneededtoplaceMathTypeequationscorrectlyinline.
\ objcroptN
Nisthetopcroppingdistanceintwips.
\ objcropbN
Nisthebottomcroppingdistanceintwips.
\ objcroplN
Nistheleftcroppingdistanceintwips.
\ objcroprN
Nistherightcroppingdistanceintwips.
\ objscalexN
Nisthehorizontalscalingpercentage.
\ objscaleyN
Nistheverticalscalingpercentage.
Objectdata
\ objdata
Thissubdestinationcontainsthedatafortheobjectintheappropriateformat;OLE
objectsareinOLESaveToStreamformat.Thisisadestinationcontrolword.
\ objalias
ThissubdestinationcontainstheAliasRecordforthepublisherobjectforthe
MacintoshEditionManager.Thisisadestinationcontrolword.
\ objsect
ThissubdestinationcontainstheSectionRecordforthepublisherobjectforthe
MacintoshEditionManager.Thisisadestinationcontrolword.
Objectresult
\ rsltrtf
ForcestheresulttobeRichText,ifpossible.
\ rsltpict
ForcestheresulttobeaWindowsmetafileorMacPictimage,ifpossible.
\ rsltbmp
Forcestheresulttobeabitmap,ifpossible.
\ rslttxt
Forcestheresulttobeplaintext,ifpossible.
\ rsltmerge
Usestheformattingofthecurrentresultwheneveranewresultisobtained.
\ result
Theresultdestinationisoptionalinthe\ objectdestination.Itcontainsthelastupdate

oftheresultoftheobject.ThedataoftheresultdestinationshouldbestandardRTF
sothatRTFreaderswhichdon'tunderstandobjectsorthetypeofobjectrepresented
willbeabletousethecurrentresultintheobjectsplacetomaintainappearance.This
isadestinationcontrolword.

Macintosh Edition Manager Publisher Objects


WordfortheMacintoshwritesPublisherObjectsfortheMacintoshEditionManagerintermsof
bookmarks(see"Bookmarks"earlierinthedocument).TherangeofPublisherobjectsaremarkedas
5 bookmarkssothesecontrolsareallusedwithinthe\ bkmkstartdestination.TheRTFsyntaxforaPublisher

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

RichTextFormatSpecificationv.1.2 Page41

Controlword Meaning
\ bkmkpub
ThebookmarkmarksaMacintoshEditionManagerPublisherObject.
\ pubauto
ThepublisherobjectwillupdateallMacintoshEditionManagerSubscribersofthis
objectautomaticallywheneveritisedited.

Drawing Objects
Drawingobjectsandthedrawnprimitivesenumeratedwithindrawingobjectgroupsusethesyntax
describedbythefollowingtables.
<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


5
Notethatin<dpgroup>thenumberof<dpinfo>sisequaltotheargumentof\ dpcount,whilein

<dppolyline>thenumberof<dppt>sisequaltotheargumentof\ dppolycount.

Thefollowingelementsofthedrawingobjectsyntaxpertainspecificallytocalloutobjects:
<cotype> \ dpcotright|\ dpcotsingle|\ dpcotdouble|\ dpcottriple

<coangle> \ dpcoa

<coaccent> \ dpcoaccent

<cosmartattach> \ dpcosmarta

<cobestfit> \ dpcobestfit

<cominusx> \ dpcominusx

<cominusy> \ dpcominusy

RichTextFormatSpecificationv.1.2 Page42

<coborder> \ dpcoborder

<codescent> \ dpcodtop|\ dpcodcenter|\ dpcodbottom|\ dpcodabs


Theremainingelementsofthedrawingobjectsyntaxarepropertiesappliedtoindividualdrawnprimitives:
<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


Thefollowingtabledescribesthecontrolwordsforthedrawingobjectgroupindetail.Allcolorvaluesare
5 RGBvaluesbetween0255.Alldistancesareintwips.Allothervaluesareasindicated.
Controlword Definition
\ do
Indicatesadrawingobject(drawingobject)istobeinsertedatthispointinthecharacter
stream.Thisisadestinationcontrolword.
\ dolock
Thedrawingobject'sanchorislockedandcannotbemoved.
\ dobxpage
Thedrawingobjectispagerelativeinthexdirection.
\ dobxcolumn
Thedrawingobjectiscolumnrelativeinthexdirection.
\ dobxmargin
Thedrawingobjectismarginrelativeinthexdirection.
\ dobypage
Thedrawingobjectispagerelativeintheydirection.
\ dobypara
Thedrawingobjectisparagraphrelativeintheydirection.
\ dobymargin
Thedrawingobjectismarginrelativeintheydirection.
RichTextFormatSpecificationv.1.2 Page43

\ dodhgtN
Thedrawingobjectispositionedatthefollowingnumericaddressinthezordering.
Drawing
primitives
\ dpgroup
Begingroupofdrawingprimitives.
\ dpcountN
Numberofdrawingprimitivesincurrentgroup.
\ dpendgroup
Endgroupofdrawingprimitives.
\ dparc
Arcdrawingprimitive.
\ dpcallout
Calloutdrawingprimitive,whichconsistsofbothapolylineandatextbox.
\ dpellipse
Ellipsedrawingprimitive.
\ dpline
Linedrawingprimitive.
\ dppolygon
Polygondrawingprimitive(closedpolyline).
\ dppolyline
Polylinedrawingprimitive.
\ dprect
Rectangledrawingprimitive.
\ dptxbx
Textboxdrawingprimitive.
Positionandsize
\ dpxN
Xoffsetofthedrawingprimitivefromitsanchor.
\ dpxsizeN
Xsizeofthedrawingprimitive.
\ dpyN
Yoffsetofthedrawingprimitivefromitsanchor.
\ dpysizeN
Ysizeofthedrawingprimitive.
Callouts
\ dpcoaN
Angleofcallout'sdiagonallineisrestrictedtooneofthefollowing:0,30,45,60,or90.
Ifthiskeywordisabsent,thecallouthasanarbitraryangle,indicatedbythecoordinates
ofitsprimitives.
\ dpcoaccent
Accentbaroncallout.(Verticalbarbetweenpolylineandtextbox).
\ dpcobestfit
Bestfitcallout.(Xlengthofeachlineincalloutissimilar).
\ dpcoborder
Visibleborderoncallouttextbox.
\ dpcodabsN
Absolutedistanceattachedpolyline.Nistheoffsetintwipsfromthecornerthataauto
attachedcalloutwouldattachto.
\ dpcodbottom
Bottomattachedpolyline.
\ dpcodcenter
Centerattachedpolyline.
\ dpcodtop
Topattachedcallout.
\ dpcolengthN
Lengthofcallout.
\ dpcominusx
TextboxfallsinquadrantsIIorIIIrelativetopolylineorigin.
\ dpcominusy
TextboxfallsinquadrantsIIIorIVrelativetopolylineorigin.
\ dpcooffsetN
Offsetofcallout.Thisisthedistancebetweentheendofthepolylineandtheedgeofthe
textbox.
\ dpcosmarta
Autoattachedcallout.Polylinewillattachtoeitherthetoporbottomofthetextbox
dependingontherelativequadrant.
\ dpcotdouble
Doublelinecallout.
RichTextFormatSpecificationv.1.2 Page44

\ dpcotright
Rightanglecallout.
\ dpcotsingle
Singlelinecallout.
\ dpcottriple
Triplelinecallout.
Textboxesand
rectangles
\ dptxbxmarN
Internalmarginofthetextbox.
\ dptxbxtext
Groupthatcontainsthetextofthetextbox.
\ dproundr
Rectangleisaroundrectangle.
Linesand
polylines
\ dpptxN
Xcoordinateofthecurrentvertex(onlyforlinesandpolylines).Thecoordinateorder
forapointmustbex,y.
\ dpptyN
Ycoordinateofthecurrentvertex(onlyforlinesandpolylines).Thecoordinateorder
forapointmustbex,y.
\ dppolycountN Numberofverticesinpolylinedrawingprimitive.

Arcs
\ dparcflipx
Thisindicatesthattheendpointofthearcistotherightofthestartpoint.Arcsare
drawncounterclockwise.
\ dparcflipy
Thisindicatesthattheendpointofthearcisbelowthestartpoint.Arcsaredrawn
counterclockwise.
Linestyle
\ dplinecobN
Bluevalueforlinecolor.
\ dplinecogN
Greenvalueforlinecolor.
\ dplinecorN
Redvalueforlinecolor.
\ dplinepal
RenderlinecolorusingthePALETTERGBmacroinsteadoftheRGBmacroin
Windows.
\ dplinedado
Dasheddottedlinestyle.
\ dplinedadodo
Dasheddotteddottedlinestyle.
\ dplinedash
Dashedlinestyle.
\ dplinedot
Dottedlinestyle.
\ dplinegrayN
Grayscalevalueforlinecolor(inhalfpercentages).
\ dplinehollow
Hollowlinestyle(nolinecolor).
\ dplinesolid
Solidlinestyle.
\ dplinewN
Thicknessofline(intwips).
Arrowstyle
\ dpaendhol
Hollowendarrow(linesonly).
\ dpaendlN
Lengthofendarrow,relativetopenwidth:
1 Small
2 Medium
3 Large
RichTextFormatSpecificationv.1.2 Page45

\ dpaendsol
Solidendarrow(linesonly).
\ dpaendwN
Widthofendarrow,relativetopenwidth:
1 Small
2 Medium
3 Large
\ dpastarthol
Hollowstartarrow(linesonly)
\ dpastartlN
Lengthofstartarrow,relativetopenwidth
1 Small
2 Medium
3 Large
\ dpastartsol
Solidstartarrow(linesonly)
\ dpastartwN
Widthofstartarrow,relativetopenwidth:
1 Small
2 Medium
3 Large
Fillpattern
\ dpfillbgcbN
Bluevalueforbackgroundfillcolor.
\ dpfillbgcgN
Greenvalueforbackgroundfillcolor.
\ dpfillbgcrN
Redvalueforbackgroundfillcolor.
\ dpfillbgpal
RenderfillbackgroundcolorusingthePALETTERGBmacroinsteadoftheRGB
macroinWindows.
\ dpfillbggrayN
Grayscalevalueforbackgroundfill(inhalfpercentages).
\ dpfillfgcbN
Bluevalueforforegroundfillcolor.
\ dpfillfgcgN
Greenvalueforforegroundfillcolor.
\ dpfillfgcrN
Redvalueforforegroundfillcolor.
\ dpfillfgpal
RenderfillforegroundcolorusingthePALETTERGBmacroinsteadoftheRGBmacro
inWindows.
\ dpfillfggrayN
Grayscalevalueforforegroundfill(inhalfpercentages).
\ dpfillpatN
Indexintoalistoffillpatterns.Seebelowforlist.
Shadow
\ dpshadow
Currentdrawingprimitivehasashadow.
\ dpshadxN
Xoffsetoftheshadow.
\ dpshadyN
Yoffsetoftheshadow.

Thefollowingvaluesareavailableforspecifyingfillpatternsindrawingobjectswiththe\dpfillpatcontrol
word:
Value FillPattern
0(zero) Clear(nopattern)
1 Solid(100%)
2 5%
RichTextFormatSpecificationv.1.2 Page46

3 10%
4 20%
5 25%
6 30%
7 40%
8 50%
9 60%
10 70%
11 75%
12 80%
13 90%
14 Darkhorizontallines
15 Darkverticallines
16 Darkleftdiagonallines(\\\)
17 Darkrightdiagonallines(///)
18 Darkgridlines
19 Darktrellislines
20 Lighthorizontallines
21 Lightverticallines
22 Lightleftdiagonallines(\\\)
23 Lightrightdiagonallines(///)
24 Lightgridlines
25 Lighttrellislines

Footnotes
The\ footnotecontrolwordintroducesafootnote.FootnotesaredestinationsinRTF.Afootnoteis

anchoredtothecharacterthatimmediatelyprecedesthefootnotedestination(thatis,thefootnotemoves
5 withthecharactertowhichitisanchored).Ifautomaticfootnotenumberingisdefined,thedestinationcan
beprecededbyafootnotereferencecharacter,identifiedbythecontrolword\ chftn.NoMicrosoftproduct

supportsfootnoteswithinheaders,footers,orannotations.Placingafootnotewithinheaders,footers,or
annotationswilloftenresultinacorruptdocument.
Footnoteshavethefollowingsyntax:
<foot> '{\ *'\ footnote<para>+'}'

10
Hereisanexampleofadestinationcontainingfootnotes.
\ftnbj\ftnrestart\sectd\linemod0\linex0\endnhere\pard\plain
\ri1170\fs20{\pu6Mead'slandmarkstudyhasbeenamplyannotated.\chftn
{\*\footnote\pard\plain\s246\fs20{\up6\chftn}SeeSahlins,Bateson,and
15 Geertzforacompletebibliography.}
ItwashereworkinAmericaduringtheSecondWorldWar,however,thatforms
thebasisforthepaper.Asothershavenoted,\chftn
{\*\footnote\pard\plain\s246\fs20{\up6\chftn}
Acompletebibliographywillbefoundattheendofthischapter.}
20 thisperiodwasaturningpointforMargaretMead.}
\par
RichTextFormatSpecificationv.1.2 Page47

Toindicateendnotes,thefollowingcombinationisemitted:\ footnote\ ftnalt.Existingreaderswillignore


the\ ftnaltkeywordandtreateverythingasafootnote.

Forothercontrolwordsrelatingtofootnotes,seethesectionsentitled"DocumentFormattingProperties",
5 "SectionFormattingProperties",and"SpecialCharacters".

Annotations
RTFannotationshavetwoparts;theauthorID(introducedbythecontrolword\ atnid)andtheannotation

text(introducedbythecontrolword\ annotation);thereisnogroupenclosingbothparts.NoMicrosoft

productsupportsannotationswithinheaders,footers,orfootnotes.Placinganannotationwithinheaders,
10 footers,orfootnoteswilloftenresultinacorruptdocument.EachpartoftheannotationisanRTF
destination.Annotationsareanchoredtothecharacterthatimmediatelyprecedestheannotation.
Ifanannotationisassociatedwithanannotationbookmark,thefollowingtwodestinationcontrolwords
precedeandfollowthebookmark.ThealphanumericstringN,suchasalonginteger,representsthe
bookmarkname.
<atrfstart> '{\ *'\ atrfstartN'}'

< atrfend>
'{\ *'\ atrfendN'}'

15
Annotationshavethefollowingsyntax:
<annot> <annotid><atnauthor><atntime>?\ chatn<atnicn>?<annotdef>

<annotid> '{\ *'\ atnid#PCDATA'}'


< atnauthor>
'{\*'\atnauthor#PCDATA'}'
<annotdef> '{\ *'\ annotation<atnref><para>+'}'

< atnref>
'{\ *'\ atnrefN'}'

<atntime> '{\ *'\ atntime<time>'}'


<atnicn> '{\ *'\ atnicn<pict>'}'


Anexampleofannotationtextfollows:
AnexampleofaparadigmmightbeNewtonianphysicsor
20 Darwinianbiology.{\v\fs16{\atnidbz}\chatn{\*\annotation
\pard\plain\s224\fs20{\field{\fldinstpage\\#'"Page:
'#'\line'"}{\fldrslt}}{\fs16\chatn}
Howaboutsomeexamplesthatdealwithsocialscience?
That'swhatthispaperisabout.}}
25
Annotationsmayhaveoptionaltimestamps(containedinthe\ atntimedestination)oricons(containedin

the\ atnicndestination).

Fields
The\ fieldcontrolwordintroducesafielddestination,whichcontainsthetextofWordforWindowsfields.

30 Fieldshavethefollowingsyntax:
<field> '{'\ field<fieldmod>?<fieldinst><fieldrslt>'}'

<fieldmod> \ flddirty?&\ fldedit?&\ fldlock?&\ fldpriv?


<fieldinst> '{\ *'\ fldinst<char>+<fldalt>?'}'


<fldalt> \ fldalt

<fieldrslt> '{\ *'\ fldrslt<para>+'}'



RichTextFormatSpecificationv.1.2 Page48

Thereareseveralcontrolwordsthataltertheinterpretationofthefield.Thesecontrolwordsare:
Controlword Meaning
\ flddirty
Formattingchangehasbeenmadetothefieldresultsincethefieldwaslastupdated.
\ fldedit
Texthasbeenaddedto,orremovedfrom,thefieldresultsincethefieldwaslastupdated.
\ fldlock
Fieldislockedandcannotbeupdated.
\ fldpriv
Resultisnotinaformsuitablefordisplay(forexample,binarydatausedbyfieldswhose
resultisapicture).

Twosubdestinationsarerequiredwithinthe\ fielddestination.Theymustbeenclosedinbraces({})and

5 beginwiththefollowingcontrolwords:
Controlword Meaning
\ fldinst
Fieldinstructions.Thisisadestinationcontrolword.
\ fldrslt
Mostrecentcalculatedresultofthefield.Thisisadestinationcontrolword.

Iftheinstructionforafieldcontainsafilename,thenthe\ cpgcontrolcanbeusedtodefinethecharacter

setofthefilename.SeeCodePageSupportfordetails.
The\ fldrsltcontrolwordshouldbeincludedevenifnoresulthasbeencalculated,becauseevenreaders

10 thatdonotrecognizefieldscangenerallyincludethevalueofthe\ fldrsltdestinationinthedocument.

Anexampleofsomefieldtextfollows:
{\field\fldedit{\fldinstauthor}{\fldrsltJoeSmith}}\par\pard
{\field{\fldinsttime\\@"h:mmAM/PM"}{\fldrslt8:12AM}}

15 Youcanusethe\fldaltkeywordtospecifythatthegivenfieldreferenceistoanendnote.Forexample,the
followingfieldinRTFisareferencetoafootnote:
{\field{\*\fldinstNOTEREF_RefNumber}{\fldrslt1}}

Thefollowingisanexampleofareferencetoanendnote:
20 {\field{\*\fldinstNOTEREF_RefNumber\fldalt}{\fldrsltI}}

Ifthespecifiedfieldisaformfield,the\*\datafielddestinationappearsasapartof<char>andcontains
thebinarydataofaformfieldinstruction.Forexample:
{\field{\*\fldinst{\*\bkmkstartText1}FORMTEXT{{\*\datafield
25 00000000000000000554657874310008476565207768697a0000000000000000000000}}}{\fldrsltDefault
Result}}{\*\bkmkendText1}

Notethatthe\datafielddestinationrequiresthe\*prefix.

Index Entries
30 The\ xecontrolwordintroducesanindexentry.IndexentriesinRTFaredestinations.Anindexentryhas

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

<txe> '{'\ txe<char>+'}'


<rxe> '{'\ rxe#PCDATA'}'


Ifthetextoftheindexentryisnotformattedashiddentextwiththe\ vcontrolword,thetextisputintothe

documentaswellasintotheindex.Formoreinformationonthe\ vcontrolword,see"Character

RichTextFormatSpecificationv.1.2 Page49

FormattingProperties".Similarly,thetextofthe\ txesubdestination,describedlaterinthissection,

becomespartofthedocumentifitisnotformattedashiddentext.
Thefollowingcontrolwordsmayalsobeused:
Controlword Meaning
\ xefN
Allowsmultipleindiceswithinthesamedocument.Nisanintegerthat
correspondstotheASCIIvalueofaletterbetweenAandZ.
\ bxe
Formatsthepagenumberorcrossreferenceinbold.
\ ixe
Formatsthepagenumberorcrossreferenceinitalic.
\ txeText
Textargumenttobeusedinsteadofapagenumber.Thisisadestinationcontrol
word.
\ rxeBookmarkName Textargumentisabookmarkfortherangeofpagenumbers.Thisisadestination

controlword.

5 Table of Contents Entries


The\ tccontrolwordintroducesatableofcontentsentry,whichcanbeusedtobuildtheactualtableof

contents.The\tcncontrolwordmarksatableofcontentsentrythatwillnothaveapagenumberassociated
withit;thisisusedinplaceof\ tcforsuchentries.Tableofcontentsentriesaredestinations,andtheyhave

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

10
Aswithindexentries,textthatisnotformattedashiddenwiththe\ vcharacterformattingcontrolwordis

putintothedocument.Thefollowingcontrolwordscanalsobeusedinthisdestination:
Controlword Meaning
\ tcfN
Typeoftablebeingcompiled;nismappedbyexistingMicrosoftsoftwaretoaletter
betweenAandZ(defaultis67,whichmapstoC,usedfortablesofcontents).
\ tclN
Levelnumber(defaultis1).

Bidirectional language support


15 RTFsupportsbidirectionalwritingordersforlanguagessuchasArabic.Thecontrolsaredescribedbelow
(aswellasintheappropriatesections).Alsorefertotheassociatedcharacterpropertiesdefinedin
AssociatedCharacterProperties,earlierinthischapter.
Allthecontrolwordsrelatingtobidirectionallanguagesupportarerepeatedhereforconvenience.
Controlword Meaning
\ rtlch
Thecharacterdatafollowingthiscontrolwordwillbetreatedasarighttoleftrun.
\ ltrch
Thecharacterdatafollowingthiscontrolwordwillbetreatedasalefttorightrun.Thisis
thedefault.
\ rtlmark
Thefollowingcharactersshouldbedisplayedfromrighttoleft.
\ ltrmark
Thefollowingcharactersshouldbedisplayedfromlefttoright.
\ rtlpar
Textinthisparagraphwillbedisplayedwithrighttoleftprecedence
\ ltrpar
Textinthisparagraphwillbedisplayedwithlefttorightprecedence.Thisisthedefault.
\ rtlrow
Cellsinthistablerowwillhaverighttoleftprecedence.
RichTextFormatSpecificationv.1.2 Page50

\ ltrrow
Cellsinthistablerowwillhavelefttorightprecedence.Thisisthedefault.
\ rtlsect
Thissectionwillthreadcolumnsfromrighttoleft.
\ ltrsect
Thissectionwillthreadcolumnsfromlefttoright.Thisisthedefault.
\ rtldoc
Textinthisdocumentwillbedisplayedfromrighttoleftunlessoverriddenbyamore
specificcontrol.
\ ltrdoc
Textinthisdocumentwillbedisplayedfromlefttorightunlessoverriddenbyamore
specificcontrol.Thisisthedefault.
\ zwj
ZeroWidthJoiner.Thisisusedforligatingwords.
\ zwnj
ZeroWidthNonJoiner.Thisisusedforunligatingaword.

Alphabetic List of RTF Keywords


ThefollowingtablecontainsalistofallRTFkeywords,thenameofthesectionwhereitmaybefound,and
abriefdescriptionofthetypeofkeyword.Thetypesaredescribedinthefollowingtable:
Type Description
Flag Thekeywordignoresanyparameter.
Destination Thiskeywordstartsagroupordestination.Itignoresanyparameter.
Symbol Thiskeywordrepresentsaspecialcharacter.
Toggle Thiskeyworddistinguishesbetween
Value Thiskeywordrequiresaparameter.
5
Note
Inthefollowingcomprehensivetable,thenamesofallcontrolwordsthatarenewtoMicrosoftWord
version6.0arefollowedbyanasterisk(*).

Controlword Describedinsection Type


\'
SpecialCharacter Symbol
\*
SpecialCharacter Symbol
\
SpecialCharacter Symbol
\:
SpecialCharacter Symbol
\\
SpecialCharacter Symbol
\_
SpecialCharacter Symbol
\{
SpecialCharacter Symbol
\|
SpecialCharacter Symbol
\}
SpecialCharacter Symbol
\~
SpecialCharacter Symbol
\ ab
Character Toggle
\ absh
Frame Value
\ absw
Frame Value
RichTextFormatSpecificationv.1.2 Page51

\ acaps
Character Toggle
\ acf
Character Value
\ additive*
StyleSheet Flag
\ adn
Character Value
\ aenddoc*
Document Flag
\ aendnotes*
Document Flag
\ aexpnd
Character Value
\ af
Character Value
\ afs
Character Value
\ aftnbj*
Document Flag
\ aftncn*
Document Destination
\ aftnnalc*
Document Flag
\ aftnnar*
Document Flag
\ aftnnauc*
Document Flag
\ aftnnchi*
Document Flag
\ aftnnrlc*
Document Flag
\ aftnnruc*
Document Flag
\ aftnrestart*
Document Flag
\ aftnrstcont*
Document Flag
\ aftnsep*
Document Destination
\ aftnsepc*
Document Destination
\ aftnstart*
Document Value
\ aftntj*
Document Flag
\ ai
Character Toggle
\ alang
Character Value
\ allprot*
Document Flag
\ alt
StyleSheet Flag
\ annotation
Annotation Destination
\ annotprot*
Document Flag
\ ansi
CharacterSet Flag
\ aoutl
Character Toggle
\ ascaps
Character Toggle
\ ashad
Character Toggle
\ astrike
Character Toggle
\ atnauthor*
Annotations Destination
\ atnicn
Annotation Destination
\ atnid
Annotation Destination
\ atnref*
Annotations Destination
RichTextFormatSpecificationv.1.2 Page52

\ atntime
Annotation Destination
\ atrfend*
Annotations Destination
\ atrfstart*
Annotations Destination
\ aul
Character Toggle
\ auld
Character Toggle
\ auldb
Character Toggle
\ aulnone
Character Toggle
\ aulw
Character Toggle
\ aup
Character Value
\ author
Info Destination
\b
Character Toggle
\ bgbdiag
Shading Flag
\ bgcross
Shading Flag
\ bgdcross
Shading Flag
\ bgdkbdiag
Shading Flag
\ bgdkcross
Shading Flag
\ bgdkdcross
Shading Flag
\ bgdkfdiag
Shading Flag
\ bgdkhoriz
Shading Flag
\ bgdkvert
Shading Flag
\ bgfdiag
Shading Flag
\ bghoriz
Shading Flag
\ bgvert
Shading Flag
\ bin
Picture Value
\ binfsxn
Section Value
\ binsxn
Section Value
\ bkmkcolf
Bookmark Value
\ bkmkcoll
Bookmark Value
\ bkmkend
Bookmark Destination
\ bkmkpub
Object Flag
\ bkmkstart
Bookmark Destination
\ blue
Colortable Value
\ box
Border Flag
\ brdrb
Border Flag
\ brdrbar
Border Flag
\ brdrbtw
Border Flag
\ brdrcf
Border Value
\ brdrdash*
Border Flag
RichTextFormatSpecificationv.1.2 Page53

\ brdrdb
Border Flag
\ brdrdot
Border Flag
\ brdrhair
Border Flag
\ brdrl
Border Flag
\ brdrr
Border Flag
\ brdrs
Border Flag
\ brdrsh
Border Flag
\ brdrt
Border Flag
\ brdrth
Border Flag
\ brdrw
Border Value
\ brkfrm*
Document Flag
\ brsp
Border Value
\ bullet
SpecialCharacter Symbol
\ buptim
Info Destination
\ bxe
Index Flag
\ caps
Character Toggle
\ cb
Character Value
\ cbpat
Shading Value
\ cchs*
Character Value
\ cell
SpecialCharacter Symbol
\ cellx
Table Value
\ cf
Character Value
\ cfpat
Shading Value
\ chatn
SpecialCharacter Symbol
\ chdate
SpecialCharacter Symbol
\ chdpa
SpecialCharacter Symbol
\ chdpl
SpecialCharacter Symbol
\ chftn
SpecialCharacter Symbol
\ chftnsep
SpecialCharacter Symbol
\ chftnsepc
SpecialCharacter Symbol
\ chpgn
SpecialCharacter Symbol
\ chtime
SpecialCharacter Symbol
\ clbgbdiag
Table Flag
\ clbgcross
Table Flag
\ clbgdcross
Table Flag
\ clbgdkbdiag
Table Flag
\ clbgdkcross
Table Flag
\ clbgdkdcross
Table Flag
RichTextFormatSpecificationv.1.2 Page54

\ clbgdkfdiag
Table Flag
\ clbgdkhor
Table Flag
\ clbgdkvert
Table Flag
\ clbgfdiag
Table Flag
\ clbghoriz
Table Flag
\ clbgvert
Table Flag
\ clbrdrb
Table Flag
\ clbrdrl
Table Flag
\ clbrdrr
Table Flag
\ clbrdrt
Table Flag
\ clcbpat
Table Value
\ clcfpat
Table Value
\ clmgf
Table Flag
\ clmrg
Table Flag
\ clshdng
Table Value
\ colno*
Section Value
\ colortbl
ColorTable Destination
\ cols
Section Value
\ colsr*
Section Value
\ colsx
Section Value
\ column
SpecialCharacter Symbol
\ colw*
Section Value
\ comment
Info Destination
\ cpg
Font Value
\ creatim
Info Destination
\ cs
Character Value
\ ctrl
StyleSheet Flag
\ cvmme*
Document Flag
\ datafield*
Field Destination
\ deff
Font Value
\ defformat
Document Flag
\ deflang
Document Value
\ deftab
Document Value
\ deleted
Character Toggle
\ dfrmtxtx
Frame Value
\ dfrmtxty
Frame Value
\ dibitmap
Picture Value
\ dn
Character Value
RichTextFormatSpecificationv.1.2 Page55

\ do*
DrawingObject Destination
\ dobxcolumn*
DrawingObject Flag
\ dobxmargin*
DrawingObject Flag
\ dobxpage*
DrawingObject Flag
\ dobymargin*
DrawingObject Flag
\ dobypage*
DrawingObject Flag
\ dobypara*
DrawingObject Flag
\ doccomm
Info Destination
\ doctemp
Document Flag
\ dodhgt*
DrawingObject Value
\ dolock*
DrawingObject Flag
\ dpaendhol*
DrawingObject Flag
\ dpaendl*
DrawingObject Value
\ dpaendsol*
DrawingObject Flag
\ dpaendw*
DrawingObject Value
\ dparc*
DrawingObject Flag
\ dparcflipx*
DrawingObject Flag
\ dparcflipy*
DrawingObject Flag
\ dpastarthol*
DrawingObject Flag
\ dpastartl*
DrawingObject Value
\ dpastartsol*
DrawingObject Flag
\ dpastartw*
DrawingObject Value
\ dpcallout*
DrawingObject Flag
\ dpcoa*
DrawingObject Value
\ dpcoaccent*
DrawingObject Flag
\ dpcobestfit*
DrawingObject Flag
\ dpcoborder*
DrawingObject Flag
\ dpcodabs*
DrawingObject Value
\ dpcodbottom*
DrawingObject Flag
\ dpcodcenter*
DrawingObject Flag
\ dpcodtop*
DrawingObject Flag
\ dpcolength*
DrawingObject Value
\ dpcominusx*
DrawingObject Flag
\ dpcominusy*
DrawingObject Flag
\ dpcooffset*
DrawingObject Value
\ dpcosmarta*
DrawingObject Flag
\ dpcotdouble*
DrawingObject Flag
\ dpcotright*
DrawingObject Flag
RichTextFormatSpecificationv.1.2 Page56

\ dpcotsingle*
DrawingObject Flag
\ dpcottriple*
DrawingObject Flag
\ dpcount*
DrawingObject Value
\ dpellipse*
DrawingObject Flag
\ dpendgroup*
DrawingObject Flag
\ dpfillbgcb*
DrawingObject Value
\ dpfillbgcg*
DrawingObject Value
\ dpfillbgcr*
DrawingObject Value
\ dpfillbggray*
DrawingObject Value
\ dpfillbgpal*
DrawingObject Flag
\ dpfillfgcb*
DrawingObject Value
\ dpfillfgcg*
DrawingObject Value
\ dpfillfgcr*
DrawingObject Value
\ dpfillfggray*
DrawingObject Value
\ dpfillfgpal*
DrawingObject Flag
\ dpfillpat*
DrawingObject Value
\ dpgroup*
DrawingObject Flag
\ dpline*
DrawingObject Flag
\ dplinecob*
DrawingObject Value
\ dplinecog*
DrawingObject Value
\ dplinecor*
DrawingObject Value
\ dplinedado*
DrawingObject Flag
\ dplinedadodo*
DrawingObject Flag
\ dplinedash*
DrawingObject Flag
\ dplinedot*
DrawingObject Flag
\ dplinegray*
DrawingObject Value
\ dplinehollow*
DrawingObject Flag
\ dplinepal*
DrawingObject Flag
\ dplinesolid*
DrawingObject Flag
\ dplinew*
DrawingObject Value
\ dppolycount*
DrawingObject Value
\ dppolygon*
DrawingObject Flag
\ dppolyline*
DrawingObject Flag
\ dpptx*
DrawingObject Value
\ dppty*
DrawingObject Value
\ dprect*
DrawingObject Flag
\ dproundr*
DrawingObject Flag
\ dpshadow*
DrawingObject Flag
RichTextFormatSpecificationv.1.2 Page57

\ dpshadx*
DrawingObject Value
\ dpshady*
DrawingObject Value
\ dptxbx*
DrawingObject Flag
\ dptxbxmar*
DrawingObject Value
\ dptxbxtext*
DrawingObject Destination
\ dpx*
DrawingObject Value
\ dpxsize*
DrawingObject Value
\ dpy*
DrawingObject Value
\ dpysize*
DrawingObject Value
\ dropcapli*
Frame Value
\ dropcapt*
Frame Value
\ ds
Section Value
\ dxfrtext
Frame Value
\ dy
Info Value
\ edmins
Info Value
\ emdash
SpecialCharacter Symbol
\ emspace*
SpecialCharacter Symbol
\ endash
SpecialCharacter Symbol
\ enddoc
Document Flag
\ endnhere
Section Flag
\ endnotes
Document Flag
\ enspace*
SpecialCharacter Symbol
\ expnd
Character Value
\ expndtw*
Character Value
\f
Character Value
\ facingp
Document Flag
\ falt*
FontTable Destination
\ fbidi
FontTable Flag
\ fcharset*
FontTable Value
\ fdecor
FontTable Flag
\ fet*
Document Value
\ fi
Paragraph Value
\ fid*
FileTable Value
\ field
Field Destination
\ file*
FileTable Destination
\ filetbl*
FileTable Destination
\ fldalt*
Document Flag
\ flddirty
Field Flag
RichTextFormatSpecificationv.1.2 Page58

\ fldedit
Field Flag
\ fldinst
Field Destination
\ fldlock
Field Flag
\ fldpriv
Field Flag
\ fldrslt
Field Destination
\ fmodern
FontTable Flag
\ fn
StyleSheet Value
\ fnetwork*
FileTable Flag
\ fnil
FontTable Flag
\ fontemb
Font Destination
\ fontfile
Font Destination
\ fonttbl
FontTable Destination
\ footer
Header/Footer Destination
\ footerf
Header/Footer Destination
\ footerl
Header/Footer Destination
\ footerr
Header/Footer Destination
\ footery
Section Value
\ footnote
Footnote Destination
\ formdisp*
Document Flag
\ formprot*
Document Flag
\ formshade*
Document Flag
\ fosnum*
FileTable Value
\ fprq*
FontTable Value
\ fracwidth
Document Flag
\ frelative*
FileTable Value
\ froman
FontTable Flag
\ fs
Character Value
\ fscript
FontTable Flag
\ fswiss
FontTable Flag
\ ftech
FontTable Flag
\ ftnalt*
Document Flag
\ ftnbj
Document Flag
\ ftncn
Document Destination
\ ftnil
Font Flag
\ ftnnalc*
Document Flag
\ ftnnar*
Document Flag
\ ftnnauc*
Document Flag
\ ftnnchi*
Document Flag
RichTextFormatSpecificationv.1.2 Page59

\ ftnnrlc*
Document Flag
\ ftnnruc*
Document Flag
\ ftnrestart
Document Flag
\ ftnrstcont*
Document Flag
\ ftnrstpg*
Document Flag
\ ftnsep
Document Destination
\ ftnsepc
Document Destination
\ ftnstart
Document Value
\ ftntj
Document Flag
\ fttruetype
Font Flag
\ fvaliddos*
FileTable Flag
\ fvalidhpfs*
FileTable Flag
\ fvalidmac*
FileTable Flag
\ fvalidntfs*
FileTable Flag
\ green
Colortable Value
\ gutter
Document Value
\ guttersxn
Section Value
\ header
Header/Footer Destination
\ headerf
Header/Footer Destination
\ headerl
Header/Footer Destination
\ headerr
Header/Footer Destination
\ headery
Section Value
\ hr
Info Value
\ hyphauto*
Document Toggle
\ hyphcaps*
Document Toggle
\ hyphconsec*
Document Value
\ hyphhotz
Document Value
\ hyphpar*
Paragraph Toggle
\i
Character Toggle
\ id
Info Value
\ info
Info Destination
\ intbl
Paragraph Flag
\ ixe
Index Flag
\ keep
Paragraph Flag
\ keepn
Paragraph Flag
\ kerning*
Character Value
\ keycode
StyleSheet Destination
\ keywords
Info Destination
RichTextFormatSpecificationv.1.2 Page60

\ landscape
Document Flag
\ lang
Character Value
\ ldblquote
SpecialCharacter Symbol
\ level
Paragraph Value
\ li
Paragraph Value
\ line
SpecialCharacter Symbol
\ linebetcol
Section Flag
\ linecont
Section Flag
\ linemod
Section Value
\ lineppage
Section Flag
\ linerestart
Section Flag
\ linestart
Document Value
\ linestarts
Section Value
\ linex
Section Value
\ linkself
Object Flag
\ linkstyles*
Document Flag
\ lndscpsxn
Section Flag
\ lquote
SpecialCharacter Symbol
\ ltrch
Character Flag
\ ltrdoc
Document Flag
\ ltrmark
Character Symbol
\ ltrpar
Paragraph Flag
\ ltrrow
Table Flag
\ ltrsect
Section Flag
\ mac
CharacterSet Flag
\ macpict
Picture Flag
\ makebackup
Document Flag
\ margb
Document Value
\ margbsxn
Section Value
\ margl
Document Value
\ marglsxn
Section Value
\ margmirror
Document Flag
\ margr
Document Value
\ margrsxn
Section Value
\ margt
Document Value
\ margtsxn
Section Value
\ min
Info Value
\ mo
Info Value
RichTextFormatSpecificationv.1.2 Page61

\ nextfile
Document Destination
\ nocolbal*
Document Flag
\ noextrasprl*
Document Flag
\ nofchars
Info Value
\ nofpages
Info Value
\ nofwords
Info Value
\ noline
Paragraph Flag
\ nosupersub*
Character Flag
\ notabind*
Document Flag
\ nowidctlpar*
Paragraph Flag
\ nowrap
Frame Flag
\ objalias
Object Destination
\ objalign
Object Value
\ objautlink
Object Flag
\ objclass
Object Destination
\ objcropb
Object Value
\ objcropl
Object Value
\ objcropr
Object Value
\ objcropt
Object Value
\ objdata
Object Destination
\ object
Object Destination
\ objemb
Object Flag
\ objh
Object Value
\ objicemb
Object Flag
\ objlink
Object Flag
\ objlock
Object Flag
\ objname
Object Destination
\ objpub
Object Flag
\ objscalex
Object Value
\ objscaley
Object Value
\ objsect
Object Destination
\ objsetsize
Object Flag
\ objsub
Object Flag
\ objtime
Object Destination
\ objtransy
Object Value
\ objupdate*
Object Flag
\ objw
Object Value
\ operator
Info Destination
RichTextFormatSpecificationv.1.2 Page62

\ otblrul*
Document Flag
\ outl
Character Toggle
\ page
SpecialCharacter Symbol
\ pagebb
Paragraph Flag
\ paperh
Document Value
\ paperw
Document Value
\ par
SpecialCharacter Symbol
\ pard
Paragraph Flag
\ pc
CharacterSet Flag
\ pca
CharacterSet Flag
\ pghsxn
Section Value
\ pgncont
Section Flag
\ pgndec
Section Flag
\ pgnhn*
Section Value
\ pgnhnsc*
Section Flag
\ pgnhnsh*
Section Flag
\ pgnhnsm*
Section Flag
\ pgnhnsn*
Section Flag
\ pgnhnsp*
Section Flag
\ pgnlcltr
Section Flag
\ pgnlcrm
Section Flag
\ pgnrestart
Section Flag
\ pgnstart
Document Value
\ pgnstarts
Section Value
\ pgnucltr
Section Flag
\ pgnucrm
Section Flag
\ pgnx
Section Value
\ pgny
Section Value
\ pgwsxn
Section Value
\ phcol
Frame Flag
\ phmrg
Frame Flag
\ phpg
Frame Flag
\ picbmp*
Picture Flag
\ picbpp*
Picture Value
\ piccropb
Picture Value
\ piccropl
Picture Value
\ piccropr
Picture Value
\ piccropt
Picture Value
RichTextFormatSpecificationv.1.2 Page63

\ pich
Picture Value
\ pichgoal
Picture Value
\ picscaled
Picture Flag
\ picscalex
Picture Value
\ picscaley
Picture Value
\ pict
Picture Destination
\ picw
Picture Value
\ picwgoal
Picture Value
\ plain
Character Flag
\ pmmetafile
Picture Value
\ pn*
BulletsandNumbering Destination
\ pnacross*
BulletsandNumbering Flag
\ pnb*
BulletsandNumbering Toggle
\ pncaps*
BulletsandNumbering Toggle
\ pncard*
BulletsandNumbering Flag
\ pncf*
BulletsandNumbering Value
\ pndec*
BulletsandNumbering Flag
\ pnf*
BulletsandNumbering Value
\ pnfs*
BulletsandNumbering Value
\ pnhang*
BulletsandNumbering Flag
\ pni*
BulletsandNumbering Toggle
\ pnindent*
BulletsandNumbering Value
\ pnlcltr*
BulletsandNumbering Flag
\ pnlcrm*
BulletsandNumbering Flag
\ pnlvl*
BulletsandNumbering Value
\ pnlvlblt*
BulletsandNumbering Flag
\ pnlvlbody*
BulletsandNumbering Flag
\ pnlvlcont*
BulletsandNumbering Flag
\ pnnumonce*
BulletsandNumbering Flag
\ pnord*
BulletsandNumbering Flag
\ pnordt*
BulletsandNumbering Flag
\ pnprev*
BulletsandNumbering Flag
\ pnqc*
BulletsandNumbering Flag
\ pnql*
BulletsandNumbering Flag
\ pnqr*
BulletsandNumbering Flag
\ pnrestart*
BulletsandNumbering Flag
\ pnscaps*
BulletsandNumbering Toggle
\ pnseclvl*
BulletsandNumbering Destination
RichTextFormatSpecificationv.1.2 Page64

\ pnsp*
BulletsandNumbering Value
\ pnstart*
BulletsandNumbering Value
\ pnstrike*
BulletsandNumbering Toggle
\ pntext*
BulletsandNumbering Destination
\ pntxta*
BulletsandNumbering Destination
\ pntxtb*
BulletsandNumbering Destination
\ pnucltr*
BulletsandNumbering Flag
\ pnucrm*
BulletsandNumbering Flag
\ pnul*
BulletsandNumbering Toggle
\ pnuld*
BulletsandNumbering Flag
\ pnuldb*
BulletsandNumbering Flag
\ pnulnone*
BulletsandNumbering Flag
\ pnulw*
BulletsandNumbering Flag
\ posnegx*
Frame Value
\ posnegy*
Frame Value
\ posx
Frame Value
\ posxc
Frame Flag
\ posxi
Frame Flag
\ posxl
Frame Flag
\ posxo
Frame Flag
\ posxr
Frame Flag
\ posy
Frame Value
\ posyb
Frame Flag
\ posyc
Frame Flag
\ posyil
Frame Flag
\ posyt
Frame Flag
\ prcolbl*
Document Flag
\ printdata*
Document Flag
\ printim
Info Destination
\ psover
Document Flag
\ psz*
Document Value
\ pubauto
Object Flag
\ pvmrg
Frame Flag
\ pvpara
Frame Flag
\ pvpg
Frame Flag
\ qc
Paragraph Flag
\ qj
Paragraph Flag
\ ql
Paragraph Flag
RichTextFormatSpecificationv.1.2 Page65

\ qr
Paragraph Flag
\ rdblquote
SpecialCharacter Symbol
\ red
Colortable Value
\ result
Object Destination
\ revauth*
Character Value
\ revbar
Document Value
\ revdttm*
Character Value
\ revised
Character Toggle
\ revisions
Document Flag
\ revprop
Document Value
\ revprot*
Document Flag
\ revtbl*
RevisionMarks Destination
\ revtim
Info Destination
\ ri
Paragraph Value
\ row
SpecialCharacter Symbol
\ rquote
SpecialCharacter Symbol
\ rsltbmp
Object Flag
\ rsltmerge
Object Flag
\ rsltpict
Object Flag
\ rsltrtf
Object Flag
\ rslttxt
Object Flag
\ rtf
File Destination
\ rtlch
Character Flag
\ rtldoc
Document Flag
\ rtlmark
Character Symbol
\ rtlpar
Paragraph Flag
\ rtlrow
Table Flag
\ rtlsect
Section Flag
\ rxe
Index Destination
\s
Paragraph Value
\ sa
Paragraph Value
\ sb
Paragraph Value
\ sbasedon
StyleSheet Value
\ sbkcol
Section Flag
\ sbkeven
Section Flag
\ sbknone
Section Flag
\ sbkodd
Section Flag
\ sbkpage
Section Flag
RichTextFormatSpecificationv.1.2 Page66

\ sbys
Paragraph Flag
\ scaps
Character Toggle
\ sec
Info Value
\ sect
SpecialCharacter Symbol
\ sectd
Section Flag
\ sectnum
SpecialCharacter Symbol
\ sectunlocked*
Section Flag
\ shad
Character Toggle
\ shading
Shading Value
\ shift
StyleSheet Flag
\ sl
Paragraph Value
\ slmult*
Paragraph Value
\ snext
StyleSheet Value
\ softcol*
SpecialCharacter Flag
\ softlheight*
SpecialCharacter Value
\ softline*
SpecialCharacter Flag
\ softpage*
SpecialCharacter Flag
\ sprsspbf*
Document Flag
\ sprstsp*
Document Flag
\ strike
Character Toggle
\ stylesheet
StyleSheet Destination
\ sub*
Character Flag
\ subdocument*
Pargraph Value
\ subject
Info Destination
\ super*
Character Flag
\ swpbdr*
Document Flag
\ tab
SpecialCharacter Symbol
\ tb
Tab Value
\ tc
TableofContents Destination
\ tcf
TableofContents Value
\ tcl
TableofContents Value
\ tcn*
TableofContents Flag
\ template
Document Destination
\ title
Info Destination
\ titlepg
Section Flag
\ tldot
Tab Flag
\ tleq
Tab Flag
\ tlhyph
Tab Flag
RichTextFormatSpecificationv.1.2 Page67

\ tlth
Tab Flag
\ tlul
Tab Flag
\ tqc
Tab Flag
\ tqdec
Tab Flag
\ tqr
Tab Flag
\ transmf*
Document Flag
\ trbrdrb*
Table Flag
\ trbrdrh*
Table Flag
\ trbrdrl*
Table Flag
\ trbrdrr*
Table Flag
\ trbrdrt*
Table Flag
\ trbrdrv*
Table Flag
\ trgaph
Table Value
\ trhdr*
Table Flag
\ trkeep*
Table Flag
\ trleft
Table Value
\ trowd
Table Flag
\ trqc
Table Flag
\ trql
Table Flag
\ trqr
Table Flag
\ trrh
Table Value
\ tx
Tab Value
\ txe
Index Destination
\ ul
Character Toggle
\ uld
Character Flag
\ uldb
Character Flag
\ ulnone
Character Flag
\ ulw
Character Flag
\ up
Character Value
\v
Character Toggle
\ vern
Info Value
\ version
Info Value
\ vertalb
Section Flag
\ vertalc
Section Flag
\ vertalj
Section Flag
\ vertalt
Section Flag
\ wbitmap
Picture Value
\ wbmbitspixel
Picture Value
RichTextFormatSpecificationv.1.2 Page68

\ wbmplanes
Picture Value
\ wbmwidthbytes
Picture Value
\ widowctrl
Document Flag
\ wmetafile
Picture Value
\ wraptrsp*
Document Flag
\ xe
Index Destination
\ xef*
Index Value
\ yr
Info Value
\ zwj
SpecialCharacter Symbol
\ zwnj
SpecialCharacter Symbol

Potrebbero piacerti anche