HTML Help Workshop - How do I link headings in a HTML page to topics in the TOC

2.2k Views Asked by At

I'm attempting to link headings within a HTML document to the TOC (Table of Contents) within the HTML Help Workshop.

For example I have a main heading <h1>Settings</h1> that I want to appear as a folder within the TOC. I also have sub topics such as <h2>Settings Icon & Page</h2> that I want to appear beneath the main topic for that section.

I also want to find a way that once a user clicks on this topic within the compiled help file that the page will jump to that topic.

Can someone please advise me if this is possible and how to tackle this problem?

This gives an example of what I'm trying to achieve.

here

1

There are 1 best solutions below

1
On BEST ANSWER

Creating TOC from headings is not recommended - use single HTML files for each topic. If you want really use "Automatically create contents file" see information below.

Please note, HTML Help Workshop is free and a good learning tool but a bit dated - twenty years old. I'd recommend using a (low priced) tool like FAR HTML for creating CHM help files. Please have a look at Successor of / Alternative to HTML Help Workshop.

Building a Table of Content (TOC) by HTML Help Workshop is time consuming.

If you want to learn how to create a topic file, index file and content file, then read the documentation. For example, here's a subtopic on MSDN that describes how to create a TOC file in the HTML Help Workshop:

Create a Table of Contents File

Let's see if I can make this clearer and recommend some steps:

  1. You create a set of HTML help files.  Each HTML file is an individual help topic.
  2. The files can contain practically anything that is supported by HTML. It's quite possible, and typical, that this set of HTML files will be browsable in Internet Explorer, for example, without doing anything in the HTML Help Workshop.  Clearly there won't be any table of contents (TOC) or index yet, but you'll have a basic HTML web site that is viewable in any web browser.
  3. The format and content of the HTML files is entirely up to you, but it should only consist of HTML, CSS and optionally JavaScript. You can focus on HTML first, and CSS later after you discover that basic HTML is probably not enough.
  4. You will then add HTML hyperlinks to/from related topics.  The URLs will all be relative.  Now you can view all of the topics in a web browser simply by clicking on your hyperlinks.  Using relative URLs will allow you to move the entire directory structure of the files anywhere and the links will still work.
  5. Now you'll include your HTML help topic files, created in the previous steps, into your HTML Help Workshop project.

You know - creating help files (CHM) has a learn curve. And most work is good content from the users view.

What I'd really recommend to save some time is  Rob Chandler's shareware tool FAR HTML. You can do anything with your prefered HTML-Editor outside and put FAR HTML into your workflow and the wizards are great.

One tip - don't look at all the options of FAR when starting.

  1. Put your HTML files to structured subfolders of your project folder e.g.

    welcome.htm
    design.css 
    First_Steps\download.htm 
    First_Steps\starting_program.htm 
    How_to_extend\extend_menu.htm 
    How_to_extend\power_function.htm
    images\gui_screenshot.jpg
    
  2. Drag and drop these files to FAR

  3. Start the wizard for HTMLHelp 1.x see main menu: Authoring > Help Wizard
  4. ready ..

Creating TOC from headings (not recommended)

For example, if one topic file contains the following:

<html>
<body>

<h1>Main Heading<h1>
...
<h2>Second-Level Heading</h2>
...
<h3>Third-Level Heading</h3>
...
</body>
</html>

Then, when you compile using by HTML Help Workshop with "Automatically create contents file" selected, you should build a contents file in which "Second-Level Heading" is a sub-heading of "Main Heading" and "Third-Level Heading" is a sub-heading of "Second-Level Heading".

If the main heading in another topic is tagged as rather than , however, then this will occupy the same position in the TOC hierarchy as the heading shown in the example above. So, the factor that determines where a heading appears in the TOC is not whether it is tagged as an element, element, or whatever; instead, it's the heading level relative to other headings in the same topic file.

You'll need an anchor tag for jumping from TOC to a special subtopic in a single HTML file. The TOC (sitemap) file e.g. foobar.hhc Needs a section like:

 <LI><OBJECT type="text/sitemap">
       <param name="Name" value="How to jump to a second anchor">
       <param name="Local" value="HTMLHelp_Examples/Jump_to_anchor.htm#SecondAnchor">
     </OBJECT>

Some screenshots of HTML Help Workshop with options you may want use:

enter image description here

enter image description here