7.2.1.4 - tocmod1.dsysTo incorporate this module in your document, place this in the global styles: [include tocmod1.dsys]
To author a heading that emplaces itself both in your document and your table of contents, place code like this in the page content: {h1 My Heading}
My content {h2 My sub-heading} My sub-content ...etc. To emplace the table of contents itself, place the page where it is to be generated last in the page sequence, then put this in the content area: {toc}
Once this is done, the TOC will not have a Next link on the link bar, because there is no next page, as it is last. But you want it to be first, of course. So here's what you do. Let's assume for a moment that your first page will be created as introduction.html So in the Page Locals area of the TOC page, you do this: [local nextpage introduction.html]
That provides the missing link forward from the table of contents to the first page in the document. Now it is linked forward to the first page, and backwards to the last page. The same issue exists with the first page. Being first, there is no previous page. So to complete the loop of pages, you will want to add the following to the Page Locals area on the first page (in this example, introduction.html): [local prevpage tocpage.html]
That's it. You now have a complete loop of pages; to start new readers off properly, just link them to tocpage.html and you're good to go. The TOC module does several things for you. It places TOC headings in the table of contents. It creates titles using HTML styles on the page itself. Optional headings track levels, just as you see in this document. There are two flags you can set, fl_indents and fl_numbers: [global fl_indents true] (or false)
[global fl_numbers false] (or true) fl_indents turns the leveled indentation on the TOC page on and off. fl_numbers turns the section numbering on and off on both the TOC page and at the local heading level. The styles defined by this module are of the form {h# heading} I have defined six levels for you, which cover the six standard HTML levels; if you need more, you'll be editing the module. Note that the heading styles are lower-case h's. In this document, I have placed the following in the global styles: [gstyle H1 {ix [b]}{h1 [b]}]
[gstyle H2 {ix [b]}{h2 [b]}] [gstyle H3 {ix [b]}{h3 [b]}] [gstyle H4 {ix [b]}{h4 [b]}] [gstyle H5 {ix [b]}{h5 [b]}] [gstyle H6 {ix [b]}{h6 [b]}] What that does when I use H# instead of h#, is automatically include the heading in the index. If I don't want a heading indexed, I just use h# instead.
Keyboard Navigation
, Previous Page . Next Page t TOC i Index |