Help Files Format

wxHTML library uses a reduced version of MS HTML Workshop format. Tex2RTF can produce these files when generating HTML, if you set htmlWorkshopFiles to true in your tex2rtf.ini file.

(See wxHtmlHelpController for help controller description.)

A book consists of three files: header file, contents file and index file. You can make a regular zip archive of these files, plus the HTML and any image files, for wxHTML (or helpview) to read; and the .zip file can optionally be renamed to .htb.

Header file (.hhp)

Header file must contain these lines (and may contain additional lines which are ignored) :

Contents file=<filename.hhc>
Index file=<filename.hhk>
Title=<title of your book>
Default topic=<default page to be displayed.htm>

All filenames (including the Default topic) are relative to the location of .hhp file.

Localization note: In addition, .hhp file may contain line

Charset=<rfc_charset>

which specifies what charset (e.g. "iso8859_1") was used in contents and index files. Please note that this line is incompatible with MS HTML Help Workshop and it would either silently remove it or complain with some error. See also Writing non-English applications.

Contents file (.hhc)

Contents file has HTML syntax and it can be parsed by regular HTML parser. It contains exactly one list (<ul>....</ul> statement):

<ul>

  <li> <object type="text/sitemap">
           <param name="Name" value="@topic name@">
           <param name="ID" value=@numeric_id@>
           <param name="Local" value="@filename.htm@">
       </object>
  <li> <object type="text/sitemap">
           <param name="Name" value="@topic name@">
           <param name="ID" value=@numeric_id@>
           <param name="Local" value="@filename.htm@">
       </object>
  ...    

</ul>

You can modify value attributes of param tags. topic name is name of chapter/topic as is displayed in contents, filename.htm is HTML page name (relative to .hhp file) and numeric_id is optional - it is used only when you use wxHtmlHelpController::Display(int)

Items in the list may be nested - one <li> statement may contain a <ul> sub-statement:

<ul>

  <li> <object type="text/sitemap">
           <param name="Name" value="Top node">
           <param name="Local" value="top.htm">
       </object>
       <ul>
         <li> <object type="text/sitemap">
              <param name="Name" value="subnode in topnode">
              <param name="Local" value="subnode1.htm">
              </object>
      ...
       </ul>
       
  <li> <object type="text/sitemap">
           <param name="Name" value="Another Top">
           <param name="Local" value="top2.htm">
       </object>
  ...    

</ul>

Index file (.hhk)

Index files have same format as contents file except that ID params are ignored and sublists are not allowed.

ymasuda 平成17年11月19日