Skip to content
martin-henz edited this page Jan 8, 2021 · 20 revisions

Here is how we indicate index entries in the XML:

  • <INDEX>: the usual rendering is applied to the content of the element
  • <SUBINDEX>: optional tag for subindex within index: the usual rendering is applied to the content of the element
  • <ORDER>: optional tag within <INDEX> and <SUBINDEX> to define the order in which the element appears in the (sub)index
  • `...: within or creates JavaScript-formatted text (names) and a page number in italics
  • `...: within or creates JavaScript-formatted text (names) and a page number in roman Before the closing tag , we allow parentheses:
  • <INDEX>... <OPEN/></INDEX> ... <INDEX>...<CLOSE/></INDEX> Such elements need to appear in pairs to indicate page ranges. The opening element needs to appear in the source documents before the closing element.
  • <INDEX><PRIMITIVE/><SUBINDEX>...</SUBINDEX></INDEX>: item is listed under "primitive functions"
  • <INDEX><OPERATOR/><SUBINDEX>...</SUBINDEX></INDEX>: item is listed under "operators"
  • <INDEX>...<SEE>...</SEE></INDEX>: creates a "see" entry
  • <INDEX>...<SEEALSO>...</SEEALSO></INDEX>: creates a "see also" entry

Turn on margin annotations by setting indexAnnotations to true in javascript/parseXmlLatex.js

  • `...: avoids placing items into margin when indexAnnotations is turned on in parseXmlLatex.js

The PDF edition currently features an index. The ebook and web editions don't have an index at the moment; users need to rely on search for those editions.

SICP coding standard mandates that index terms are on their own line. This may add trailing white space between the end of prose and an index, which in LaTeX may lead to lines overflowing with an entirely blank next line. This is extremely rare (<1 occurrence per mille!). If this happens, insert a comment between the prose and index terms to consume the space, like so:

    <UL>
      <LI>
        <B>primitive expressions</B>, which represent the simplest
        entities the language is concerned with,<!--
        --><INDEX>primitive expression</INDEX>
      </LI>
      <LI>
        <B>means of combination</B>, by which compound
        elements are built from simpler ones, and<!--
        --><INDEX>means of combination</INDEX><!--
        --><INDEX>combination, means of</INDEX>
      </LI>
      <LI>
        <B>means of abstraction</B>, by
        which compound elements can be named and manipulated as units.<!--
        --><INDEX>means of abstraction</INDEX>
      </LI>
    </UL>
Clone this wiki locally