Preparing the help file for integration with Delphi IDEBefore integrating a help file into the Delphi IDE, some preparations are necessary.One top level topic bookThe table of contents of your help file should have just one top level topic book, i.e. <TopicBook> </TopicBook> should surround all other topics and topic books in the master topic file. Make sure your master topic file has the following structure: <!DOCTYPE DLHelpSource>
<DLHelpSource>
<BrowseSequence Name="Auto"/>
<TopicBook Title="My Library Help">
<TopicEx>
<Title>Topic 1</Title>
<Body> </Body>
</TopicEx>
...
<TopicEx>
<Title>Topic n</Title>
<Body> </Body>
</TopicEx>
<TopicBook Title="TopicBook 1">
<!-- More topics and topicbooks here-->
</TopicBook>
...
<TopicBook Title="TopicBook m">
<!-- More topics and topicbooks here-->
</TopicBook>
</TopicBook>
</DLHelpSource> For more information on building contents files and master topic files, see Build a Contents file. Generating the .als fileDelphi 6 and Delphi 7 users also need an .als file. Time2HELP generates the .als file when Compiler Version is set to 'Delphi 6' or heigher.Including KeywordsMake sure the property "Include keywords for properties, methods and events" on the outputs property page is checked, then build the help file.Modifying the Contents fileIt is advisable to split the generated contents file (.cnt) into a .toc file and a .cnt file. The .toc file contains the actual table of contents, the .cnt file contains the title and some other necessities, such as a directive to include the .toc file.If the name of your help file is MyLibrary.hlp, copy the file MyLibrary.cnt to MyLibrary.toc. Open MyLibrary.cnt in e.g. Notepad, and then delete the lines that start with a number. Then add an :Index and :Include directive in the exact order as shown below: :Base MyLibrary.hlp>main
:Title My Library Documentation
:Index My Library Documentation=MyLibrary.hlp
:Include MyLibrary.toc Save and close MyLibrary.cnt, open MyLibrary.toc (in Notepad or similar). Insert a ';' below the :Title directive as shown below: :Base MyLibrary.hlp>main
:Title My Library Documentation
;
1 My Library Help
2 xxx
... Save and close MyLibrary.toc. The help file should now be ready to integrate into the Delphi IDE with OpenHelp
|