Contents Up << >>

## Authoring Windows Help documents

To produce a Windows Help file, you need to generate a WinHelp RTF file with Tex2RTF and then invoke a Windows Help compiler (such as hc505.exe) to translate this to a .hlp file.

WinHelp support has split into two streams, Windows 3.1 help format and Windows 95 (WinHelp 4) format. You control this with the winHelpVersion option, setting it to 3 for Windows 3.1, and 4 for Windows 95. In the latter case, you also need the Help Compiler for Windows (hcw.exe and associated components) which are available in the WIN32 SDK and with Windows 95 compilers.

Tex2RTF can produce a Windows 95 `.cnt` file if winHelpContents is switched on. This file is used to generate the new-style contents page, allowing hierarchical browsing of the topic contents. In fact this file can be used with ordinary Windows 3.1 files on Windows 95: so to hedge your bets, generate a Windows 3.1 help file along with `.cnt` file.

Tex2RTF also generates (optionally) a `.hpj` (Help Project) file which is fed to the help compiler and specifies the RTF file being used amongst other things. In WinHelp 4 mode, Tex2RTF adds entries to the project to enhance the appearance of the help file. In particular, the non-scrolling (topic title) region is coloured grey, and the rest is coloured a light yellow in keeping with other Windows 95 help files.

Tip: you can maintain two versions of a help file by specifying an alternative `.ini` file on the command line when invoking Tex2RTF, and compiling to a different directory. Tex2RTF instructs the help compiler to use the input file directory to find bitmaps and metafiles, so using a different output directory is not a problem.

There is a slight wrinkle with generation of the `.cnt` file: to work around a 'feature' in the Windows 95 help compiler, Tex2RTF may insert extra book icons in the contents page. So your contents page may not exactly match the structure in your LaTeX file.

'Advanced features' which are implemented for WinHelp include:

- Transparency: `\settransparency` command
- Colour: `\definecolour`, `\fcol`, `\bcol` commands
- Hot spot appearance: `\sethotspotcolour`, `\sethotspotunderline` commands

Tex2RTF automatically generates browse buttons for jumping to the above, previous and next topics.

See RTF/WinHelp options for relevant initialisation file switches.