![Page 1: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/1.jpg)
Anatomy of an RTF File
George Tisdale
April 30, 2005
![Page 2: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/2.jpg)
Basic Components
Lead in Font table Color table Style sheet Information Data
![Page 3: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/3.jpg)
![Page 4: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/4.jpg)
![Page 5: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/5.jpg)
Lead In
Identifies the file as an RTF file Sets the default language
![Page 6: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/6.jpg)
![Page 7: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/7.jpg)
Font Table
Lists the fonts that are used Equates the fonts with an f# reference
Example: f0 is Times New Roman in the previous slides
![Page 8: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/8.jpg)
![Page 9: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/9.jpg)
Color Table
List of colors as a mix of red, green and blue
Each item is separated by a semi-colon If an item is missing the default is used,
but the semi-colon must be present
![Page 10: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/10.jpg)
![Page 11: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/11.jpg)
Style Sheet
Mixes fonts, typeface sizes, boldness, indents, tabs and colors into a Style number
Styles are “\s##” two digit number usually starting at 11
Numbers are set at 1440=1 inch Tab stops are defined \tqc\tx2160 sets a
centering tab at 1.5 inches
![Page 12: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/12.jpg)
![Page 13: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/13.jpg)
RTF Document
RTF reader (Word) has interpreted the file and translated it into a formatted document.
![Page 14: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/14.jpg)
LIBRTF.DLL
Prepares the skeleton of the file Converts simple annotations into RTF
code Replaces imbedded instructions with RTF
code Processes an RTF file from a passed
matrix of data
![Page 15: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/15.jpg)
Syntax
FNRTF( MAT TYPES$, MAT STYLES$, MAT DATA$, RTFFILE; LMARGIN, RMARGIN)
(LMARGIN and RMARGIN are optional)
![Page 16: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/16.jpg)
TYPES$
Matrix of single character codes H – header F – footer D – data T – Total
These are examples and not required usage
![Page 17: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/17.jpg)
Styles
Matrix of same size as TYPES$ that defines the styles being used
Elements separated by pipes “|”
STYLES$(1)="li0|ri0|fs18|cfBlue|tc3.25|Header"
STYLES$(3)="li0.25|ri0|fs10||tl2.5|td3|tl3.2|td4.0|tl4.2|td4.6|tl4.8|td5.4|Data"
![Page 18: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/18.jpg)
DATA$
Text to be printed by RTF reader Fields separated by pipes “|” Pipes represent TAB characters Additional tabs embedded with “\tab “ Grouped with “{“ and “}”
LET DATA$(1)="H|\b\tab Title Of Report"
![Page 19: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/19.jpg)
RTFFILE
Existing open display file Open with
recl=32000 EOL=none
![Page 20: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/20.jpg)
Margins
RTF reader will use its default margins Overrides can be set for WORD using
LMARGIN RMARGIN
![Page 21: Anatomy of an RTF File George Tisdale April 30, 2005](https://reader033.vdocuments.mx/reader033/viewer/2022061305/55145dd2550346b0158b475a/html5/thumbnails/21.jpg)