Contents

Overview

Program Operation

Using RTFGEN to Create a Help File

Menu Selections

Topic Files

General Editing Considerations

RTFGEN Defaults

Topic File Layout

Commands

Macros

WinHelp Macros

RTFGEN Macros

Restrictions and Problems

References

Copyright


Commands

Command Syntax

RTFGEN Commands

Topic Header Commands

Cross Reference Commands

Definitions

Bitmap Commands

Block Formatting Commands

\tabstops command

\include command

RTF Commands

Font Commands

Paragraph Commands

Tabbing Commands


Overview

Normally, to create a help file with the Windows help compiler, you must first write a help topic file using a Rich Text Format (RTF) word processor.  For many, there are two problems here:

1.	RTF word processors are expensive.

2.	The time spent learning to use a new word processor may not be a very productive use of one's time.

RTFGEN solves both these problems by allowing you to use your favorite ASCII text editor to produce the RTF formatted files required by the help compiler.  RTFGEN also automates much of the process of creating help files:

 	Creates the Help Project File (.HPJ) for the help compiler

 	Calls the help compiler from Windows

 	Collects any error or warning messages

 	Displays the resulting help file

 	Optionally creates help context files to be included in your C or Pascal program


General Editing Considerations

Almost any ASCII editor may be used.  I use Borland's BPW IDE.  It's probably best to turn off options like 'optimal fill' which can leave invisible and possibly unknown tab characters in the document.  See Editing Precautions.

The use of tabs is required to obtain column allignment with  proportional fonts.  Either the tab character or the RTF command,  \tab, may be used with the same effect. The \tab has the advantage that it's visible in your ASCII file.

RTFGEN and/or the RTF language have special use for the following  characters:

`	(grave accent)  Used to mark the end of paragraphs.

[, ]	Used to mark jumps and definitions.

{, }	Used to mark areas where font characteristics will change.

\	Used as a command start character.

When these characters are to be used in the text, they should be  preceded by a \.  Thus, \[ will cause the left bracket to be inserted in text and \\ will result in a single backslash being inserted in text.

( * . . . * ) may be used to insert comments within the text.


Editing Precautions

Word Wrap

Editing in word wrap mode causes the entire paragraph to appear as one line in the text file.  Previous versions of RTFGEN had a line length limit of 255 characters which caused long paragraphs to be truncated.  Starting with version 2.02, the allowable line length has been increased to 2000 characters which should be adequate for most paragraphs.  Still, I don't recommend the use of word wrap because:

 	Long line lengths make it difficult to correlate errors reported when RTFGEN is run.

 	The resulting file may be incompatible with other editors.

WRITE

WRITE (comes with Windows) may be used as an editor providing the output is saved in text format.  To do this, you must use the "Save As" dialog and select "Text Files ( *.TXT)" in the "Save file as type:" combobox.  (It's not sufficient to merely append a .TXT extension to the filename.)  Apparently, it's easy to overlook this as I have received a number of problem topic files which turned out to be in Write format.

What makes this especially deceptive is that RTFGEN will often read Write formated files with no problem.  However, eventually a relatively small change in the file will cause it to be rejected.


RTFGEN Defaults

Helv, 10 point font.

Paragraphs are left justified.  The first line is not indented.

Paragraph indentation is set by indentation of the first line of the paragraph.

Tabs are spaced every 720 twips (about 6 default characters).

Any of these defaults may be changed globally for the whole document, or locally at the topic, paragraph, or even character level.


Using RTFGEN to Create a Help File

It's probably a good idea to create a separate directory for your help project.  The RTFGEN.EXE file can either be in this directory or elsewhere.  The file, HEADING, should be avaiable either in the help project directory or on the same directory with RTFGEN.EXE.  The Help Compiler should be somewhere on the Path.  You will need to know the name of the Help Compiler executable -- look for HC30.EXE, HC31.EXE, HC.EXE, or HCP.EXE.  See Defining a .PIF file for the Help Compiler.

Once the files are set up, the steps required to create a Windows help file using RTFGEN are:

1.	Using an ASCII editor, create one or more topic files.  These would normally be saved with the .TPC extension.  See Topic File Layout

2.	Launch RTFGEN and select Project | Topic Files.  Enter the name(s) of the topic files.

3.	From the menu select Project | Options.  Select the appropriate options.  The Help button provides further information on the selections.

4.	Use File | Save As to save your selections to a Help Project Source file (.HPS) while naming your project at the same time.  When you restart your project at a later time, it's only necessary to load this .HPS file.

5.	Compile | RTF Only will compile your topic files to form the RTF files (.RTF) and the Help ProJect file (.HPJ) required by the Help Compiler.

6.	Compile | Help Compiler invokes the Help Compiler to create the help file itself.

7.	Compile | Display Help File may then be used to call WinHelp to display the help file.

8.	The Compile | Full Compile, Display (or F9 key) combines steps 5, 6, and 7 in one step and ends by displaying the help file (assuming there were no intervening errors).

9.	Once you've seen the help file displayed, you'll probably want to return to your editor for changes or additions.  You can leave RTFGEN active in Windows and, when it comes time to see the help file again, just save it from the editor, enter RTFGEN, and hit the F9 key.

You can practice using RTFGEN with the demo files included with this package.

SIMPLE.TPC

can be used to create a very simple help file.

RTFGEN.TPC

MISC.TPC

RTFGEN.MAC

are the files necessary to generate this help file.


Menu Selections

File

New

Start a new help file project.

Open

Open an existing help file project.

Save

Save the help file project.

Save As

Save the help file project with a new name.

Exit

Exit RTFGEN

Project

Topic Files...

Opens up a dialog box to add, change, or delete the project's topic filenames.

Options...

Opens up a dialog box to add, change, or delete the project's options.

Compile

RTF Only

Compiles the Topic files to yield the RTF files for the help compiler.

Help Compiler

Calls the help compiler to compile the help file from the RTF files.

Display Help File

Displays the help file produced by the help compiler.

Full Compile, Display

Does all three of the above steps at once, assuming no errors.

Help

Contents

Displays this help file.

Other Help Files

Opens up other help files by selection.

About

The about box.


Option Dialog

Click any area to get more information.


Select whether you want to use version 3.0 or 3.1 of the help compiler.  Also make sure the name entries match the compiler's filenames used on your system.

If you're using a PIF file, the PIF file's name should be entered here.


Turning context sensitive help on causes RTFGEN to generate a file of topic identifiers equated to constant values.  You can include this file in your program to refer to topics in the help file to produce context sensitve help such as was done when the HELP button brought up this screen.

With context sensitive help on, the C file is always generated as it is included in the .HPJ file.  If you're a Pascal programmer, you can also generate a Pascal constant file.

Choose filenames for these files that are appropriate for your program.

See Also : Help Context Files


Compression will compress the final help file so that it occupies less disk space.  It's probably appropriate to leave compression off during development but turn it on for the final help file.

When compressing a help file, the help compiler generates a key phrase file (.PH).  You may be able to save some compile time by using the old key phrase file when recompiling after making minor changes.


The Title entered here will appear on the caption bar when the help file is displayed.


Enter the name of the topic which should appear first when the help file is activated.  This topic will also appear when the CONTENTS button is activated.

If this entry is left blank, the first topic to be compiled will be used.


If you're using Build Tags, enter the build expression here.

RTFGEN is presently restricted to using the 'OR' operator only.  The following would be acceptable:

TAG1

TAG2

TAG1 | TAG2


Topic Dialog

Click any area to get more information.


Lists the topic files for the project.


Allows adding a topic file to the project.


Will delete the highlighted topic file from the project.


Accepts the entries as shown.


Cancels any changes made.


Bring up this help screen.


HEADING File
The file, HEADING, is copied to the start of each RTF file generated. Along with some boilerplate RTF commands, it contains the font and color tables defining fonts and colors by number.


Topic File Layout

Click any area to get more information.


TWIP: A 20th of a point.  For our purposes, 1440 twips per inch. One 10 point character is about 120 twips wide.


A grave accent, '`', is used to mark paragraph  ends.


The command, \docstart, marks the end of the document header and the start of the topics.


The command, \docend, marks the end of the document.


Start of Topic Text Marker

A row of 5 or more '='s starting in column 1 marks the end of a topic header and the start of the topic text.


End of Topic Marker

A row of 5 or more hyphens starting in column 1 marks the end of a topic.

An optional formfeed or several blank lines may follow the row of hyphens to better format your ASCII file.


Document Header

The optional document header may contain commands to overide the RTFGEN defaults.  Commands changing the font, font size, or paragraph first line indent might be appropriate here.

The \docstart command follows the document header to mark the start of the topics.

Example:

\f0 \fs24   ( * Times Roman font, 12 pitch for entire help file * )

\docstart


Topic Header

The topic header contains commands defining build tags, context strings, title, keywords, and browse sequence number as appropriate for the topic.  Topic global formatting commands may also be included. The topic header section is terminated with a row of 5 or more '='s.

Example:

\title Table of Contents`

\topic contents`

\keyword contents`

\f0 \fs24   ( * Times Roman font, 12 pitch for this topic * )

============  ( * end of topic header * )

See also : Topic Header Commands


Topic Text

Text for the topic is entered here.  Rules for text entry are:

Paragraph ends are marked with a grave accent, "`"

Blank lines will appear as blank lines.

By default, paragraphs are left justified.  The indenting of the paragraph is set by the indenting of the first line of the paragraph.  Indenting of lines after the first is ignored.

Carriage return, linefeed combinations within the paragraph are are interpreted as a single space.  It's the grave accent, "`", which defines the extent of the paragraph.

Commands may be interspersed within the text for special effects.  The commands themselves won't appear in the final result.

Examples:

ASCII

Here is a typical paragraph.  It will appear in the font

and pitch specified in the topic header or document

header.  It is left justified and indented by 360 twips

because the first line is so indented.  The paragraph

is terminated with a grave accent character.`

Result

Here is a typical paragraph.  It will appear in the font and pitch specified in the topic header or document  header.  It is left justified and indented by 360 twips because the first line is so indented.  The paragraph is terminated with a grave accent character.

ASCII

\b\fi480 Here is another paragraph.  It will appear in

bold font because of the \b command.  It will also be

be indented by 360 twips and left justified.  The

\fi480 will cause the first line of the paragraph

to be indented an additional 480 twips.`

Result

Here is another paragraph.  It will appear in bold font because of the \b command.  It will also be be indented by 360 twips and left justified.  The \fi480 will cause the first line of the paragraph to be indented an additional 480 twips.


Command Syntax

Commands for RTFGEN and RTF commands passed thru to the help compiler have a similar syntax.  Commands start with a  backslash followed by a lowercase alpha symbol.  Some RTF commands have a numerical value attached.  Some RTFGEN commands  have an additional parameter string.

Examples:

\box

\topic <topic name>

\fs24          RTF command with number

\fi-720        minus sign may be used if appropriate

When commands are mixed with text, a trailing space may be  required as a delimiter.  The first space following a command is  considered part of the command--additional spaces are part of the text.


Topic Header Commands

\buildtag <parameter string>`

\topic <parameter string>`

\title <parameter string>`

\keyword <parameter string>`

\browse <parameter string>`

These commands correspond to the *, #, $, K, and + footnotes described in the help compiler documentation.  Each topic header will contain one or more of these commands as appropriate.  The order of the commands is unimportant except for the \buildtag command which, if used, should precede all else in the Topic Header.

The parameter string should --

have format and contents exactly as described in the help compiler documentation for the equivalent footnote.

be entirely on one line.

be terminated by an end of paragraph mark.

More than one \keyword command may be used if the number of keywords would exceed the allowable editor line length.

Examples:

\topic proc_deleting_text`

\title Deleting Text`

\browse procedures:020`

\keyword delete;clipboard`

See also: Topic Header


Cross Reference Commands
Cross References

Cross references may be included in the topic text using the format:

[<green text>:<context>]

where the brackets indicate a cross reference, <green text> will appear highlighted, and <context> is the topic context string for the jump destination.  To include a ':' withing the <green text>, use '\:'.

Example:

To change the color of an existing object, the object is first [selected:selecting].  Its color may then be changed.`

You can also open the cross reference in a secondary window using the format:

[<green text>:<context>><windowname>]

where a '>' separates the context identifier from the secondary window name.  The secondary window needs to be defined in the .HPS file.

Example:

RTFGEN.HPS contains the following lines:

[WINDOWS]

window2 = "Secondary Window Example", (120, 120, 400, 400), 0, ,

ASCII:

[Try it:CrossReferences > window2]

Result:

Try it


Definitions

Definitions may also be included in topic text by enclosing them in double brackets:

[[<green text>:<context>]]

Example:

Each space is equivalent to 120 [[twips:twip_def]].`


Bitmap Commands

\bml <filename>

\bmr <filename>

\bmc <filename>

These commands are used to insert bitmaps within the topic text.  If the bitmap file is not in the .HPS directory, <filename> should include the complete path.  RTFGEN strips off the path for the RTF file (as required by the help compiler) but uses the complete filename for the [BITMAPS] section of the .HPJ file.  In cases where a bitmap file is used more than once, the full path is only required in one of the references.

Example:

ASCII

A bitmap may be placed in a sentence \bmc glass.bmp just like any character.`

Result

A bitmap may be placed in a sentence [image] just like any character.

It's also possible to use a bitmap to cause a jump or bring up a  definition as:

ASCII

[[\bml tryme.bmp:bmpPop]]`

Result

You can easily add hotspots to the bitmap itself.  For this, you'll need the Hot Spot Editor, SHED.EXE.


Illustrates a bitmap popup.


Block Formatting Commands

\blockstart <commands>`

\blockend

The blockstart,  blockend commands define a block over which a set of RTF commands will apply.  These commands are used mainly when  laying out tables where formatting is somewhat complex.  An  example of their use is given in the tabbing commands section.

The block commands may be nested to a level of 4.


\tabstops Command

The \tabstops command simplifies setting up tab stops by providing a picture string defining the tab positions.

\tabstops

.....-----L-------------C-------------------R

Here, the L, C, and R show the positions of left, center, and right justified tabs.  The '---' and '....' show character spacing and left indent assuming 120 twips per character.

ASCII

\blockstart\tabstops

......------------------R-----------C

\b Left\tab Right\tab\ Centered`

Data1\tab 1234\tab 12345`

ABC \tab 12\tab 3333444`

XYZdef\tab 45678\tab 9`

\blockend`

Result

Left	Right	Centered

Data1	1234	12345

ABC 	12	3333444

XYZdef	45678	9


\include Command

Files may be included in the topic file using the \include command.  This is particularly useful for macro definition files.

Example:

\docstart

\include rtfgen.mac`


Font Commands

Fonts are refered to by number.  Number vs font is set by the font table in the HEADING file.  See Font Examples for a list of fonts.

\f000	change to font 000

\fs000	set font size in half points

\plain	plain text (as opposed to bold, italic)

\b	bold

\i	italic

\ul	underline

\uldb	double underline

\uld	dotted underline

\strike	strikethru text

\scaps	small caps

\cf000	set foreground color to 000

The scope of font commands may be document global (placed in  document header), topic global (placed in topic header),  paragraph global (placed at start of paragraph), or character or  word global (scope defined with { . . }).

Examples:

ASCII

\b This paragraph will appear in bold text.`

Result

This paragraph will appear in bold text.

ASCII

This paragraph is {\ul mostly} in plain text with a {\b bold} and a red {\i\cf4 italicized} word.  {\f3 Fonts and \fs30 pitch} can be temporarily changed.`

Result

This paragraph is mostly in plain text with a bold and a red italicized word.  Fonts and pitch can be temporarily changed.


Paragraph Commands

\par	end of paragraph.  RTFGEN handles this.

\pard	reset to paragraph defaults.  RTFGEN handles this.

\keep	don't word wrap.

\keepn	create non-scrolling window at top of topic.  Must be used only in first paragraph.

\li000	left paragraph indent in twips.  RTFGEN handles this.

\fi000	first line indent.  May be negative.

\ri000	right paragraph indent.

\sb000	space below paragraph.

\sa000	space above paragraph.

\ql	left justified (default)

\qc	paragraph is centered

\qr	right justified

\box	paragraph is surrounded by a box

\brdrl	left border

\brdrb	bottom border

\brdrr	right border

\brdrt	top border

The scope of paragraph commands may be document global (placed in  document header), topic global (placed in topic header), or  paragraph global (placed at start of paragraph).

Examples:

ASCII

\box\qc This paragraph is surrounded by a box and is centered.`

Result

This paragraph is surrounded by a box and is centered.

ASCII

\fi-360 The first line of this paragraph overhangs by about 3 characters.  Note that RTFGEN has already indented the paragraph 720 twips because of its interpretation of the 6 character indentation on the first line.`

Result

The first line of this paragraph overhangs by about 3 characters.  Note that RTFGEN has already indented the paragraph 720 twips because of its interpretation of the 6 character indentation on the first line.


Tabbing Commands

In RTFGEN, either the tab character or the RTF command, \tab, may  be used to produce a tab in the help file.  By default, tabs are  every 720 twips (about 6 characters).  If neat columns are desired with proportional fonts, tabs are a must.

\tab	causes tab

\tx0000	defines tab position in twips.  May be used multiply and should be used prior to using  tabs.

The following should be used just prior to the \tx000 command to  which they are to apply:

\tqr	tab is right justified

\tqc	tab is centered

The \blockstart..\blockend commands may be used to prepare the format for a table.

Example:

ASCII

\blockstart \li1000\tqr\tx2700\tqc\tx4000` ( * tab setup * )

\ul Left\tab\ul Right\tab\ul Centered`  ( * underlined table heading * )

Data1\tab 1234\tab 12345`

ABC \tab 12\tab 3333444`

XYZdef\tab 45678\tab 9`

\blockend

Result

Left	Right	Centered

Data1	1234	12345

ABC 	12	3333444

XYZdef	45678	9


WinHelp Macros

RTFGEN supports the new Help Compiler macros.  These macros can be called whenever -

 	The help file first starts

 	A particular topic comes up

 	As a result of clicking on a hot spot

To call one or more macros when the help file starts, place them in the [CONFIG] section of the .HPS file, as:

[CONFIG]

PositionWindow(450, 25, 575, 975, 1, "main")

Note that RTFGEN already manages the BrowseButtons( ) macro in the [CONFIG] section.

To activate a macro whenever a particular topic comes up, use the \macrocall command in that topic's header.

\macrocall !about()`

will bring up the help file's about box when the topic starts.  Note the use of the ! mark and the ( ) to indicate the absence of parameters.  To call more than one macro, use a semicolon to separate them.

To set up a hot spot macro, an excamation mark has been added to the normal hotspot syntax.

ASCII

[Clock Button:!CreateButton("cl_button", "&Clock", "ExecProgram(`clock', 0)")]`

[Remove Button:!DestroyButton("cl_button")]`

Result

Clock Button

Remove Button


RTFGEN Macros

RTFGEN also has a syntax for text macros.  Text macros are useful for defining often used RTF command sequences such as might be used for paragraph styles. To define a text macro, use \define and \endm as:

\define \MyMacro <whatever>\endm`

where <whatever> can be just about anything including commands and calls to other macros.

Rules for Text Macro Definitions

 	The macro name must start with a capital letter but is otherwise case insensitive.

 	<whatever> may include %1, %2, .. %9 to indicate where up to 9 calling parameters get substituted.

 	A macro definition cannot contain another macro definition.

 	Macro definitions may occupy more than one line but the \endm must be the last item on its line.

To call a macro, just insert

\MyMacro(Par1, Par2, ..)

in the topic text.  When a macro is called, all the <whatever> text (with the parameters substituted) become part of the topic text.  The number of parameters doesn't have to match the number in the definition.

Syntax for the RTFGEN macro parameters is the same as that of WinHelp macros.  Double quotes may be used to enclose parameters containing spaces or commas. In addition, the `...' ** sequence may be used to enclosed complex parameters as might occur if a parameter contained another macro call.  Uncomplicated parameters may be used without any enclosing quotes.

\MyMacro("This is some text", foo)`

Some special escape sequences apply to macro definitions and parameters:

\%n	Use in a macro definition to indicate %n is not a parameter.

\"	Use in a "..." sequence to indicate the " does not end the sequence.

\`, \'	Use in a `...' sequence to indicate these marks are not part of the sequence.

See also:

Macro Examples

Restrictions


Note:  When used as a macro parameter delimiter, the ` (grave accent) is not interpreted as a paragraph mark.


Restrictions and Problems

1.	Text macros are limited to 255 characters when fully expanded.

2.	Error reporting leaves something to be desired particulary when errors occur in macros.

3.	The Build Expression (for Build Tags) can only contain the OR operator or no operator.  AND, NOT and parenthesis are not supported.


References

Here's a list of references which may be helpful in developing help files.

The MicroSoft Developer Network CD

Contains The Windows Help Authoring Guide and documentation for the Windows 3.1 SDK as well as all kinds of other useful programming information.

The Windows Help Authoring Guide

This is available on the CD and possibly elsewhere.  It's been rewritten as a help file and can be found in the WINSDK forum on CompuServe (GO WINSDK) library 16 as HAG.ZIP. Apparently, the help file version is also available on Internet at ftp.cica.indiana.edu.

Windows 3.1 SDK

Programmer's Reference Volume 4: Resources contains documentation on RTF commands and help macros.  If you don't have the SDK, this volume can be purchased separately. Microsoft Press ISBN 1-55615-494-1, $22.95.

Also the WIN31WH.HLP file that comes with the SDK makes a very handy online reference.

HCP.ZIP

A new protected mode version of the MicroSoft's Help Compiler can be downloaded from CompuServe (GO WINSDK) library 16.


Copyright
© Copyright 1992-4 by L. David Baldwin

All Rights Reserved

RTFGEN may be copied and distributed freely providing that no fee is charged and it is not part of a package for which a charge is made.

Please report all bugs, suggestions, and problems to Dave Baldwin, CompuServe ID #76327,53.

Source code (Borland Pascal 7.0) is available for $10.

22 Fox Den Rd., (Summer)

Hollis, NH 03049

(603) 465-7857

144 13th St. East,  (Winter)

Tierra Verde, FL 33715

(813) 867-3030


Defining a .PIF file for the Help Compiler

It's probably a good idea to define a PIF file for the help compiler otherwise you take your chances with what's been defined in _DEFAULT.PIF.  A sample HC31.PIF is supplied with RTFGEN but you'll probably have to edit it using the PIF editor which comes with Windows.

Here are the important PIF file entries:

Program Filename:

Enter the full path and filename for the help compiler.

Memory Requirements:

Enter -1 for both  KB Required and KB Desired to indicate maximum available memory.

Display Usage:

Check "Windowed" to indicate the help compiler should run in a window.

Close Window on Exit

Check this box.


Help Context File

To support context sensitive help in your program, you'll need a file equating topic identifiers to constant values.  If you wish to have RTFGEN generate such a file, turn on "context sensitive help" in the Options dialog.

If you already have such a file from another source, you can have RTFGEN pass on the information to the Help Compiler.  To do this, edit the .HPS file for your project to include the file in the [MAP] section, as:

[MAP]

#include <myhelp.h>

In this case, you should make sure "context sensitive help" is turned off in the Options dialog.


Color Examples
Colors

Foreground color may be specified with the \cfn command where n is the color number.  The HEADING file supplied with RTFGEN sets up the color numbers as shown below.

n	    Color

0	This text is in the default color

1	This text is blue

2	This text is green

3	This text is cyan

4	This text is red

5	This text is magenta

6	This text is brown

7	This text is gray

8	This text is light gray

9	This text is light blue

10	This text is light green

11	This text is light cyan

12	This text is light red

13	This text is light magenta

14	This text is light yellow

15	This text is supposed to be white


Font Examples
Fonts

Fonts are specified with the \fn command where n is the font number.  The HEADING file supplied with RTFGEN sets up the font numbers as shown below.  By default RTFGEN uses font 2.

 n 	      Font (10 pt)            	      Font (12 pt)

0.	This font is Tms Rmn.	This font is Tms Rmn.

1.	Τηισ φοντ ισ Σψμβολ  (Symbol).	Τηισ φοντ ισ Σψμβολ  (Symbol).

2.	This font is Helv.	This font is Helv.

3.	This font is Courier.	This font is Courier.

4.	This font is MS Sans Serif.	This font is MS Sans Serif.

5.	This font is Helvitica.	This font is Helvitica.

6.	This font is Arial.	This font is Arial.

7.	This font is Arial Super.	This font is Arial Super.

8.	This font is MS Serif.	This font is MS Serif.

9.	This font is Times.	This font is Times.

10.	This font is Times New Roman.	This font is Times New Roman.

In Windows 3.1, the default [FontSubstitutes] section in WIN.INI, performs the following translations:

Helv=MS Sans Serif

Tms Rmn=MS Serif

Times=Times New Roman

Helvetica=Arial


Macro Examples
Text Macro Examples

Sample code and results for the text macros in the file, RTFGEN.MAC.

\S1, Non-scroling heading

\S2, Scrolling heading

\S3, Bulleted items

\S4, Numerical list, non-wrapping

\S5, Numerical list, wraps

\S6, List of items, explanations


Non-scrolling heading

The \S1 macro is used to make a non scrolling window caption like the one at the top of this topic.  It can be used only as the first paragraph in a topic and shouldn't be used in any topic which will be a popup.

Definition:

\define \S1 \sb50\sa50 \f2\fs24 \qc\b \cf9 \keepn \endm`

Example:

\S1 Non-scrolling heading`

Result:

See the heading above.


Scrolling heading

The \S2 macro provides a heading which scrolls with the topic.

Definition:

\define \S2 \sb50\sa50 \f2\fs24 \qc\b \cf9 \endm`

Example:

\S2 Scrolling heading`

Result:

Scrolling heading


Bulleted List

The \S3 macro can be used to produce a list of bulleted items.

Definition:

\define \S3\blockstart\li480 \tx480\fi-250 \bmc bluedot.bmp \tab \endm`

Because the definition contains a \blockstart command, the list should be terminated with a \blockend command.

Example:

\S3`

The \\S3 macro produces bulleted items.`

Here's another item.`

\blockend

Result:

 	The \S3 macro produces bulleted items.

 	Here's another item.


Numerical List, non-wrapping

Definition:

\define \S4 \blockstart \li0\tqr \tx600 \tx840 \tab \keep \sa75\endm`

Because the definition contains a \blockstart command, the list should be terminated with a \blockend command.

Example:

\S4`

1.\tab Here's the \S4 macro.  It's useful for a numerical list. Note that the second column doesn't wrap.`

22.\tab The numbers in the first column are right justified.`

\blockend

Result:

1.	Here's the \S4 macro.  It's useful for a numerical list. Note that the second column doesn't wrap.

22.	The numbers in the first column are right justified.


Numerical Wrapping List

Definition:

\define \S5\blockstart\fi-480 \li480\tqr \tx360\tx480 \sa100 \tab\endm`

Because the definition contains a \blockstart command, the list should be terminated with a \blockend command.

Example:

\S5`

1.\tab Here's the \S5 macro.  It's also useful for a numerical list. Note that the second column wraps.`

22.\tab The numbers in the first column are right justified.`

\blockend

Result:

1.	Here's the \S5 macro.  It's also useful for a numerical list. Note that the second column wraps.

22.	The numbers in the first column are right justified.


List of items, explanations

The \S6 macro is useful for a list of items and explanations.  It has a numerical parameter which specifies the spacing to the second column.  The second column wraps back to its tab position

Definition:

\define \S6\blockstart\li%1\fi-%1\tx360 \tx%1 \tab \endm`

Because the definition contains a \blockstart command, the list should be terminated with a \blockend command.

Example:

\S6(1400)`

\b\ul Key\tab\b\ul Usage`

F1\tab Brings up help information.  (This column wraps.)`

<alt>-X	Exits program`

\blockend

Result:

Key	Usage

F1	Brings up help information. (This column wraps.)

<alt>-X	Exits program


Help Project Source File (.HPS)

The Help Project Source File retains information on the help project between sessions.  RTFGEN maintains this file based on the information you supply through the various dialog boxes.

Normally, you need not be concerned with the contents of this file.  However, in some special situations, you may want to add additional information or options.  These might include:

 	Adding start up macros to the [CONFIG] section

 	Adding aliases to the [ALIAS] section

 	Defining a secondary window in the [WINDOWS] section

 	Adding a Help Context File to the [MAP] section

 	Making use of one of the [OPTIONS] that RTFGEN doesn't handle such as ICON or COPYRIGHT

 	Or any other situation where you might want to alter the Help Project File (.HPJ)

If you look at the .HPS file, you'll note that it is very similar to the .HPJ file.  You can add the material you want and it will get copied to the .HPJ file.


Help Project File (.HPJ)

The Help Project File is required by the MicroSoft Help Compiler.  This file is maintained by RTFGEN.