next up previous contents index
Next: Integrated Glossary and Index Up: No Title Previous: Indicating Differences between Document

   
Indexing

 
change_begin96.1f
LATEX2HTML automatically produces an Index consisting of the arguments to all \index commands encountered, if there are any. A hyperlink is created to that point in the text where the \index command occurred.

More sophisticated indexing is available by loading the makeidx package. Most of the features described in [, Appendix A] become available. This includes:

 
* styled entries, using `@' :
Entries of the form \index{ <sort-key>@ <styled-text>} produce <styled-text> as the entry, but sorted according to <sort-key>.

 

* hierarchical entries, using `!' :
Entries of the form \index{ <item>@ <sub-item>} set the <sub-item> indented below the <item>. Unlimited levels of hierarchy are possible, even though LATEX is limited to only 3 levels. The <sort-key>@ <styled-text> can be used at each level.

 

* explicit ranges, using `|(' and `|)' :
This is perhaps more useful in the LATEX version. In the HTML version these simply insert words ``from'' and ``to'', respectively, prior to the hyperlink to where the index-entry occurs.

   

* |see{ <index-entry>} :
provides a textual reference to another indexed word or phrase, by inserting the word ``see''. This can be used in conjunction with \htmlref to create a hyperlink to the <index-entry>; viz.
\index{latexe@\LaTeXe |see{\htmlref{\LaTeX}{IIIlatex}}}
where a \label has been specified in some other index-entry, as follows:
\index{latex@\LaTeX\label{IIIlatex}}

 

* |emph :
is recognised but ignored; other | <command> commands are not processed by LATEX2HTML, with the following exception... is handled correctly, by applying \emph to the text of the generated hyperlink.

 

* | <style> :
where <style> is the name of LATEX style-changing command, without the initial `\'; e.g. `emph', `textbf', `textit', etc. The corresponding LATEX command is applied to the text of the generated hyperlink.

   

* blank lines and alphabetization:
Having precisely a single space-character after the | (e.g. \index{A| }) places a blank line before the index entry and omits the hyperlink. This is used mainly for visual formatting; it allows a break before the entries starting with each letter, say. Using a printable-key, as in \index{Q@Q, R| }, is appropriate when there are no indexed words starting with `Q', say.

 

* quoted delimiters:
The three special delimiters can be used within the printable portion, if preceded by the double-quote character: "@, "|, "! and also "" for the quote character itself. Also \" produces an umlaut accent on the following character, when appropriate, else is ignored.

   
Furthermore, the printable part of an index entry can contain HTML anchors; that is, hyperlinks and/or \label{...}s. This allows index entries to contain cross-links to other entries, for example, as well as allowing index-entries to be the target of hyperlinks from elsewhere within the document.

The next section describes how this feature is used within this manual to create a Glossary, containing a short description of all file-names, configuration-variables and application software mentioned within the manual, integrated with the Index. All occurrences of the technical names can be easily found, starting from any other.

 

When a single item is indexed many times, it is sufficient to have a \label command appearing within the printable portion of the first instance of an \index{...} command for that item, within a single document segment.


If the index-entries are in different segments of a segmented document, it is sufficient to have the \index{...@...\label{...}} appearing within that segment, in which the item is indexed, whose indexing information is loaded earliest via a \internal[index]{...} command. When in doubt, include one \index{...@...\label{...}} per segment in which the item is indexed.

   

For cross-links to work effectively within segmented documents, the indexing command \index{...@...\label{...}} must occur earlier in the same segment than any use of \index{...@...\htmlref{...}{...}} intended to create a link to that label. If the \label occurs in a different segment, then a \internal[index]{...} command for that segment, may be needed at the beginning of the segment with the \htmlref. When this is done incorrectly, the resulting link will be to the segment where the indexed item occurred, rather than staying within the Index.



   

Since use of section-names, as the text for hyperlinks, can lead to a very long and cumbersome Index, especially when single items have been indexed many times, a further feature is provided to obtain a more compact Index.  
Use of the command-line option -short_index causes a codified representation of the sectioning to be used, rather than the full section-name. The differences are as follows.

These features can also be obtained by setting the variable $SHORT_INDEX to have value `1', in a configuration or initialisation file; provided, of course, that the document loads the makeidx package.
change_end 96.1f



 
next up previous contents index
Next: Integrated Glossary and Index Up: No Title Previous: Indicating Differences between Document
root
1998-02-23