Sitemap files

The TOC and keyword index both use a Microsoft file format called "sitemap." Sitemap files are based upon HTML's standard <UL> and <LI> tags, supplemented with OBJECT tags used by the HTML Help ActiveX control. A snippet from a sitemap file is shown below.

<UL> <LI> <OBJECT type="text/sitemap"> <param name="Name" value="This book appears the first level"> </OBJECT> <UL> <LI> <OBJECT type="text/sitemap"> <param name="Name" value="This topic appears beneath the book"> <param name="Local" value="welcome.htm"> </OBJECT> </UL> </UL>

Building a TOC

To build a TOC, switch to the Contents tab and click the Insert a Heading or Insert a Page button to create an entry. The sticky part is typing a title for each topic and associating it with the appropriate HTML file. Next, arrange the headings and topics into the proper hierarchy and save the file with an .hhc extension.

A shortcut: you can have Workshop automatically generate a TOC based on your page headings (see "automatically generating TOCs" in the Workshop help index), but the results will require some clean up work.

Building an index

Creating a usable keyword list requires even more time and effort, but is worth the investment. The index is constructed much like the table of contents-switch to the Index tab and use the buttons to enter a keyword and associate it with one or more HTML files-but it is saved with an .hhk file extension. Don't worry about sorting your keywords: by default the compiler will alphabetize them when it builds the .chm file.