Search code examples
htmlcompilationchmtableofcontentshtml-help-workshop

Index is empty in a chm file compiled with Microsoft HTML Help Workshop


I am working with Microsoft Html Help Workshop and trying to build a help project which has more than 19k help files including html, css, png etc. I built an hhp file as new.hhp and put folllowing lines in it

  [OPTIONS]
     Auto Index=Yes
     Auto TOC=9
     Compatibility=1.1 or later
     Compiled file=new.chm
     Default Window=TriPane
     Default topic=HomePage.htm
     Display compile progress=Yes
     Error log file=log.log
     Full-text search=Yes
     Index file=Index.hhk
     Language=0x409 English (United States)
   [WINDOWS]
     TriPane="new",,"Index.hhk",,"HomePage.htm",,,,,0xe2520,255,0x304e,[0,0,800,600],,,,,2,,0
   [FILES]

I checked the option to create a binary index as shown here.

I checked the option for including keywords as shown here.

I compiled it as new.chm and it searches for all the required topics but index file is empty as shown here.

I also checked the index.hhk file and it is empty as shown here too..

Its not possible for me to include keywords manually for 19k files. What should I do to so that keywords from all html files add to index and I don't get the empty index ? Thanks for paying attention.


Solution

  • The short answer - there is no automated way!

    The keywords are assigned manually to the topics with Microsoft HTMLHelp Workshop. Please keep in mind - the technical development for CHM files and the HTMLHelp Workshop is 25 years old. But there is no real alternative under Windows even today, unfortunately.

    You probably expect from Include keywords from HTML files option the keywords (HTML syntax e.g.: <meta name="keywords" content="CSS, Script">) to be integrated automatically. But keywords for CHM are thought of differently here and something special (e.g. <meta Name="MS-HKWD" content="keyword">). I can't remember but maybe the HTML tag keywords didn't exist at that time (25 years ago).

    You know, a single word index is quite familiar to everyone, having been employed in the back of reference and trade books practically since the beginning of print. But creating a good index for HTMLHelp files (CHM) is time consuming and requires a lot of work. Since users are increasingly using the full text search of CHM Viewer (or Google), I rarely create a complex index nowadays.

    (1) You may want to create the index.hhk file by yourself writing a script e.g.:

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    <HTML>
    <HEAD>
    <meta name="generator" content="Microsoft&reg; HTML Help Workshop 4.1">
    <!-- Sitemap 1.0 -->
    </head>
    <body>
    <OBJECT type="text/site properties">
    </OBJECT>
    <UL>
        <LI><OBJECT type="text/sitemap">
                <param name="Name" value="Flowers">
                <param name="Name" value="Flowers">
                <param name="Local" value="Garden/flowers.htm">
             </OBJECT>
        <LI><OBJECT type="text/sitemap">
                <param name="Name" value="Garden">
                <param name="Name" value="Garden">
                <param name="Local" value="Garden/Garden.htm">
             </OBJECT>
        <LI><OBJECT type="text/sitemap">
                <param name="Name" value="How one grows trees">
                <param name="Name" value="How one grows trees">
                <param name="Local" value="Garden/tree.htm">
             </OBJECT>
    </UL>
    </BODY>
    </HTML>
    

    (2) You may want to use a freeware tool like FAR HTML (recommended using the Wizard!):

    Please note - freeware tools like FAR HTML are using the complete contents of a tag to generate a index and don't output single words for index of help files.

    enter image description here

    (3) You can find more information with additional details at: