5. Scribe User Manual -- Index

5. Scribe User Manual -- Index

Browsing

Home: Scribe User Manual

Previous chapter: Hyperlinks and References
Next chapter: Bibliography

Index

5.1 Make-index
5.2 Index
5.3 Print-index

Chapters

1. Getting Started
2. Syntax
3. Standard Library
4. Hyperlinks and References
5. Index
6. Bibliography
7. Computer programs
8. Graphical User Interfaces
9. Customization
10. Scribe style files
11. Editing Scribe Programs
12. Compiling Scribe programs
13. Compiling Texi documents
14. Using Bibtex databases
15. Functions and Variables

Scribe

Home page:Scribe

Documentation:user
expert
styles

Scribe support indexes. One may accumulate all entries inside one unique index or dispatch them amongst user declared indexes. Indexes may be monolithic or split. They only differ in the way they are rendered by the back-ends. For a split index a sectioning based on the specific (e.g., the first one) character of index entries is deployed.

5.1 Make-index

(make-index name)Scribe function

Declares a new index. It is an error to declare an already existing index. Note that Scribe automatically declares one global index named theindex. So, for documents requiring one unique index, there is no need to use the make-index function call at all. For instance, the following Scribe expression declares an index named index1:

(make-index "index1")

This example produces no output but enables entries to be added to that index. In general it is convenient to declare indexes before the call to the document function.

5.2 Index

(index [:index #f] [:note #f] [:shape #f] name)Scribe function

Adds a new entry into one existing index and set a mark in the text where the index will point to. It is an error to add an entry into an index that is not already declared.

argumentdescription
:indexThe name of the index whose index entry belongs to. A value of #f means that the theindex owns this entry.
:noteAn optional note added to the index entry. This note will be displayed in the index printing.
:shapeAn optional shape to be used for rendering the entry.
nameThe name of the entry. This must be either a string or a list of strings.

The following expressions add entries to the index index1:

[The identifier ,(code "Foo"),(index :index "index1" "Foo") is a usually
used as an example. When two identifiers have to used, frequently the
second choice is ,(code "Bar"),(index :index "index1" "Bar" :shape (it "Bar")).
When three are needed, some use ,(code "Baz")
,(index :index "index1" "Baz" :shape (it "Baz")).

This illustrates how to use identifier
,(index :index "index1" "Foo" :note "How to use Foo")
,(index :index "index1" "Foo" :note "How not to use Foo")
,(index :index "index1" "Fooz")
...]

There is no output associated with these expressions. The identifier Foo is a usually used as an example. When two identifiers have to used, frequently the second choice is Bar. When three are needed, some use Baz . This illustrates how to use identifier ...

5.3 Print-index

(print-index [:split #t] [:char-offset 0] [:header-limit 100] . indexes)Scribe function

Prints indexes.

argumentdescription
:splitIf #t, character based sectioning is deployed. Otherwise all the index entries are displayed one next to the other.
:char-offsetThe character number to use when split is required. This option may be useful when printing index whose items share a common prefix. The :char-offset argument can be used to skip this prefix.
:header-limitThe number of entries from which an index header is introduced.
indexesThe name of the indexes to be displayed. If no name is provided, the global index theindex is printed.

The example:

(print-index "index1")

produces:

B
Bar
Baz
F
Foo
   ...How not to use Foo
   ...How to use Foo
Fooz


This page has been generated by Scribe.
Last update Wed Dec 18 09:23:02 2002