Chapter 3.10. Index Terms

Text can be marked as index term by enclosing the text with the <span class="indexterm"> ... </span> element. In the following example, the term "Web Browser" has been inserted at the end of the first sentence:
<p>Firefox is a web-browser<span class="indexterm">Web Browser</span>.</p>
Note that index terms are not visible in the exported publication at the position where they have been inserted. That means, the content is rendered the same way as if the indexterm class included the CSS property "display:none" (for HTML-based output this is how it is actually realized).
Multiple index terms
To supply more than one index term at the same text position, multiple index terms can be separated by a pipeline character (|). In the following example, the terms "Web Browser" and "Internet Browser" are inserted at the same position:
<p>Firefox is a web-browser<span class="indexterm">Web Browser|Internet Browser</span>.</p>
Multi-level index terms
Entries in an index can have up to three levels. This permits grouping of sub-topics under a keyword. A keyword and its subtopic have to be separated by a double-dash (--). In the following example, the term "Add-ons" is grouped as a subtopic of "Firefox", which is itself a subtopic of "Web Browser":
<p>Firefox is a web-browser<span class="indexterm">Web Browser--Firefox</span>. Many add-ons<span class="indexterm">Web Browser--Firefox--Add-ons</span> exist for this browser.</p>
See Section 1.13.6, “Creating index entries” for an example of how multi-level index terms are rendered in the index section.
"See ..." index entries
To indicate that an index term is a synonym for another index term, place a {see: ...} expression at the end of the index term. In the following example, the index term "WWW" is listed as a synonym for "World Wide Web":
<p>The World Wide Web<span class="indexterm">World Wide Web</span> became popular in the 90s. WWW<span class="indexterm">WWW {see: World Wide Web}</span> is the acronym for "World Wide Web".</p>
Be aware that an index term can at most have one {see: ...} expression. Placing more than one {see: ...} expression at the end of an index term leads to a formatting error.
"See also ..." index entries
To insert a reference from one index term to another index term, place one or more {seealso: ...} expressions at the end of the index term. In the following example, the index term "Web Browser" references the index terms "Firefox" and "Internet Explorer":
<p>A web-browser<span class="indexterm">Web Browser {seealso:Firefox}{seealso:Internet Explorer}</span> is a viewing application.</p>
Index range entries
If an index entry should logically cover a range of pages, then an index term has to be placed at the start of the range and at the end of the range. The index term at the start of the range has to get the prefix {start:range_id}, where range_id is a unique identifier for the range. Allowed characters for range_id are letters, digits and underscore. The index term at the end of the range has to be {end:range_id}, where range_id is the same identifier as supplied in the start of the range. Following example defines a range with identifier "browser_config" for the index term "Web Browser--configuration":
<span class="indexterm">{start:browser_config}Web Browser--configuration</span>
  ...
<span class="indexterm">{end:browser_config}</span>