Creating an index

Affinity can create an index of topics from your publication's text. The index lets the reader look up these topics and the pages that mention them.

About indexes

An index is a valuable reader aid in a long publication, such as a report or manual.

An example index.

For Affinity to create an index, you'll need to add index marks to your document.

The index usually appears at the end of your publication and contains index entries. Each index entry has a topic name and either or both:

  • a list of page numbers on which the topic is referenced.
  • cross-references which suggest to the reader to look at a related entry.

You can organize entries in a hierarchy. A parent topic can have sub-topics with their own references.

When the index is generated, it will list, in alphabetical order, all topics and sub-topics that have at least one reference.

Building an index

Affinity is flexible about how index entries are created. You can either:

  • create topics on the Index panel, then insert index marks in text and associate them with topics.
  • insert index marks in text and create new index topics (or associate with existing topics) at the same time.

You can also import index topics from a file instead of creating them from scratch. The file can be an Affinity file (.af or .afpub) containing an index, or a plain text file (.txt) containing one index topic name per line.

To insert an index, you'll need one entry with a page reference.

Building the index is straightforward. To summarize:

  1. On the Index panel, add a topic you wish to appear in your publication's index.
  2. Wherever related text appears in your publication, use the Index panel to insert an index mark.
  3. Repeat steps 1 and 2 until you've created topics and index marks for all entries you wish to appear in the index.
  4. Create an insertion point in your document where you wish the index to appear, then use the Index panel to insert the index.

The inserted index will list, in alphabetical order, all topics for which there is at least one index mark, and page numbers for related index marks.

Finding instances of a topic name

From any topic on the panel, you can tell Affinity to show all instances of the topic's name in document text.

From the list, you can choose which instances you want to associate with the topic. Affinity inserts index marks at your selected instance's positions, quickly building up the index's content.

Organizing the index

A parent topic can be set for any existing topic or sub-topic, creating a hierarchy that is visually reflected in the index.

You can add cross-references to suggest related topics to the reader.

You can rename existing topics and sub-topics. This affects their position in the index.

If you edit topics, sub-topics or index marks after inserting the index, you will need to update the inserted index to reflect these changes.

Sorting index topics

Normally, Affinity sorts index topics by their literal topic names. So, topic names that begin with A or The, for example, will appear in the index under A or T, respectively.

You can change the default sort order by setting a topic's Sort By name. For example, if a topic's name is The Great Wall of China, set the Sort By name to Great Wall of China to make the topic appear under G in the index.

You can also use Sort By text to override order without changing topic names. For example, you might wish to convey the hierarchical importance of sub-topics rather than list them alphabetically.

How to insert an index mark

How to add a topic (without inserting an index mark)

The topic will not be listed in the inserted index unless you assign index marks to it.

How to add a sub-topic

How to merge index topics from another file

How to add a cross-reference

How to find a topic in document text and add to the index

How to insert the index

You can then use the Index panel to add topics and index marks to the index and adjust the index's formatting.

How to update the inserted index

How to go to an index mark in your document

An insertion point is created at the index mark and the document view focuses on it.

How to show/hide index marks in the document view

How to delete an index mark

How to delete a topic or sub-topic

Any index marks assigned to the topic are also deleted.

SEE ALSO:

How would you rate the help you received from this article?