After setting up the RTF standards for the Help file, you define the topic information. Topics consist of Help-specific information, which is defined in topic footnotes, character and paragraph formatting information, plain text and graphics that the user sees, and a page break delimiter.
A topic is specified with the #{\footnote context string} group statement, which identifies each topic in a Help file. A context string is any string of up to 255 characters. Valid characters are the alphabetic characters A–Z, the numeric characters 0–9, and the period (.) or underscore (_) character.
For example, this RTF entry defines the context string “main_contents”:
#{\footnote main_contents}
Typically, a topic will also contain a title specified with the ${\footnote title-text} group statement, which identifies the topic in Help dialog boxes. A title string is any string of up to 50 characters. Any printable ASCII character may appear in a topic title. However, ASCII characters such as braces ({ }), brackets ([ ]), and backslashes (\) that are used as special characters in RTF must be prefixed by backslashes.
This example defines the title “Saving a Document”:
${\footnote Saving a Document}
Font and Formatting Information
Before any text is placed in the RTF file, the font name and font size must be specified. The \fn statement specifes the font name (n matches the font number defined in the font table). The \fsn statement specifies the font size (n is given in half-points). For example, using the sample font table just described, the following example defines the text as 10-point MS Sans Serif:
\f4\fs20
If you want the text to have any special formatting characteristics, you must also define those before you write out the plain text. The Help compiler supports a number of character and paragraph formatting attributes that you can use to change the appearance and placement of text and graphics.
The following example defines the topic title text as 14-point MS Serif with 17 points of space before, 6 points space after, and 16 points of leading. The topic title paragraph is also indented 6 points from the left margin:
\pard\plain \li120\sb340\sa120\sl-320 \f3\fs28
When there is more than one topic in an RTF file, each topic except the last one should endewith a \page statement:
\page