Sorting Multi-Level Indexes in LibreOffice Writer

Creating an organized multi-level index in LibreOffice Writer requires an understanding of how the application processes alphabetical sorting across different entry tiers. This article outlines the specific sorting rules, hierarchical behaviors, and locale-based configurations available in LibreOffice Writer to control the alphabetical order of primary keys, subkeys, and complex index structures.

Hierarchical Key Precedence

Multi-level indexes in LibreOffice Writer function through a structured hierarchy consisting of a main entry (1st key), a secondary entry (2nd key), and a tertiary entry (3rd key). Sorting rules are applied strictly from the top level downward:

  1. Primary Sort (1st Key): All main entries are sorted alphabetically against one another according to the selected language collation rules.
  2. Secondary Sort (2nd Key): Subentries are grouped exclusively beneath their respective primary entry and sorted alphabetically within that specific group.
  3. Tertiary Sort (3rd Key): Sub-subentries are sorted alphabetically only within their respective secondary parent group.

A subentry will never sort independently of its parent key, ensuring that the contextual relationship between topics remains intact.

Locale and Language-Based Collation

Alphabetical sorting in LibreOffice Writer is directly tied to the document’s language settings or the specific language chosen for the index:

Case Sensitivity Rules

LibreOffice Writer provides options to govern how letter casing influences alphabetical order:

Custom Sort Keys (Manual Overrides)

Writer allows users to override automatic alphabetical sorting by defining a “Sort by” value during index entry insertion. This feature is particularly useful for:

Asian and Phonetic Sorting

For documents using East Asian languages (such as Japanese or Chinese), LibreOffice Writer supports phonetic sorting rules:

Applying and Configuring Sorting Options

To configure or modify sorting rules for an index in LibreOffice Writer:

  1. Right-click the generated index table and select Edit Index.
  2. In the Type tab, select Alphabetical Index as the index type.
  3. Under the Sort Options section, choose the appropriate Language and Key type (alphanumeric or numeric).
  4. Check or uncheck Case sensitive according to the indexing requirements of the document.
  5. Click OK to apply the rules across all index levels.