Prev Next Top
The TOC template contains variables and special item type identifier tags, or, I call them the "X" tags. As explained earlier, an item type identifier contains formatting information for generating an item that identifies a resulting HTML page that corresponds to a specific level of its related heading. A TOC page has the following parts:
- A top part that contains non-list contents such as a title and an introduction that precedes the list of sections and sub-sections of your document set. Only one variable is recognized: @NAME@. It will be replaced by the file name of your source document (without its ".htm" extension).
- Parts that are enclosed within complementary pairs of X tags; they describe the format of each item of the table of contents, more on this, below.
- The end part that is not enclosed between the X tags; it should end with the usual </BODY></HTML>, but may contain text, images and other hyperlinks.
There are 7 recognized X tags pairs, three item tag pairs and four transitional tag pairs. The item tag pairs are:
- <X1>
and </X1>: List item for level 1 sections of your documents, those that reference your document segment from <H1> headings.
- <X2>
and </X2>: List item for level 2 sections of your documents, those that reference your document segment from <H2> headings.
- <X3>
and </X3>: List item for level 3 sections of your documents, those that reference your document segment from <H3> headings.
The template part contained within these X tag pairs can have the following variables:
- @FILEPATH@
: This variable will be replaced by the relative file-path of the corresponding HTML file that comes from the segment of the same level (i.e. <H2> level if the part is enclosed between <X2> tag pairs).
- @TITLE@
: This variable will be replaced by the title of the corresponding HTML file that comes from the segment of the same level.
A typical simple second level item part will be:
<X2> <LI><A HREF="@FILEPATH@">@TITLE@</A></LI>
</X2>
The following X tags (recognized by the fact that they contain 2 digits) are "transitional" tags. They do not contain any variable.
- <X12>
and </X12>: Part that represents a transition from level 1 to level 2.
- <X23>
and </X23>: Part that represents a transition from level 2 to level 3.
- <X32>
and </X32>: Part that represents a transition from level 3 to level 2.
- <X21>
and </X21>: Part that represents a transition from level 2 to level 1.
A typical simple 1st to 2nd level transition is:
<X12><UL>
</X12>
The TOC.htm file of this document has been created with the help of the TOCTemplate.htm file that is located in the application directory. The TOC template might come from two possible sources:
- The file named TOCTemplate.htm that is located in the application directory (the "default TOC template"). You can replace this file with your own designed TOC template and it should have the same name.
- The name of the file that you specified in the TOC Setup panel and that should be found in your source document directory.
Prev Next Top