Schlussteil - Ebene 1 - Thema 1

Generating Table of Contents (TOC) with FAR or HTMLHelp Workshop

When you are using FAR and generating TOC/Index files:

Got to Menu >Options > Preferences > HTMLHelp
1. Check "Include HTML Bookmarks (slow)" checkbox
2. Check "Detect Bookmark <Hn> Level" checkbox

When searching for files the program also opens each HTML file found and searches for HTML bookmarks. Any bookmarks found are then included in the TOC. Bookmarks such as <a name="xyz"></a> do not wrap a text label and are normally ignored by FAR. If "Include empty bookmarks" item is checked then the Bookmark is included and the bookmark "xyz" is used as the TOC label. Bookmarks are often associated with a <H1>, <H2> etc heading tag.

EG1. <h1><a name="Bookmark1">My Title</a></h1>
EG2. <a name="Bookmark1"><h1>My Title</h1></a>

When the checkboxes are checked (see above) FAR will attempt to detect the associated header level and create TOC structure (levels) for the bookmark items. Note that if only one H1 bookmark heading is detected for an HTML document (see source of this file), and it is the first bookmark, then FAR will skip the first bookmark in an attempt to normalize the TOC (since the HTML document TOC item and H1 bookmark item are usually doing the same job).
Note: This setting only works for documents with good heading structure. If FAR finds a document full of say only H4 and H5 heading tags it will leave the structure mostly flat.

 

When you are using HTMLHelp Workshop:

To automatically generate a table of contents

1. Open a project (.hhp) file.
2. Click Change Project Options, and then click the Files tab.
3. Click Browse, next to the Contents file box, and then locate the folder that you want to store your contents file in.
4. In File name box, type a name (using .hhc for the file name extension) for your contents file.
5. Click Open. The name of your contents file and the full path appear in the Contents file box
6. Select the Automatically create contents file (.hhc) when compiling check box.
7. In the Maximum head level box, click the maximum heading level you want entries generated for in your contents file. For example, if you click 3 for the maximum head level, entries will be generated with <H1>, <H2>, and <H3> heading tags.

Note
:
If you make changes to a contents file that has been automatically generated, you will lose them if you compile the project again. To prevent this, make sure the Automatically create contents file when compiling check box is cleared before you recompile.

The [OPTIONS] section of your .hhp file reads:

[OPTIONS]
Auto Index=Yes
Auto TOC=3
Binary TOC=Yes

One can also arrange the pages so that the first one has a single <h1> heading, and the others have a single <h2> or a single <h3> heading (the <h3> pages might have <h4>'s and <h5>'s, but they do not contribute to the TOC). If the pages are ordered in the .hhp file so that the header types are properly nested, then the generated TOC reflects exactly what is written in the .hhp file, with the <h1> header and <h2> headers showing as "books" and the <h3> headers as "pages".

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Schlussteil - Ebene 2 - Thema 1.1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Schlussteil - Ebene 3 - Thema 1.1.1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Schlussteil - Ebene 2 - Thema 1.2

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Schlussteil - Ebene 2 - Thema 1.3

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Schlussteil - Ebene 3 - Thema 1.3.1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

 

 

 


 

 

back to top ...