Sorting and combining entries in a user-defined index

I’m using LibreOffice 7.3
I have a book in which I want to create three separate indexes: a standard alphabetical index, and two user-defined indexes, one for people referenced in the book, and the other for works cited.
I’ve used alphabetical indexes before and they work fine for my purposes.
However, the user-defined index is missing two critical options:

  1. It’s not sorted alphabetically
  2. Identical entries are not combined

It doesn’t seem possible to create multiple alphabetical indexes which have these options. Is there any way around this?

Also, is there any way to delete a user-defined index?

As you noticed, “user indexes” are in fact alternate table of contents: entries are listed in page order and don’t merge. Also there is only a single alphabetical index. So, to achieve your goal, you must cheat a bit.

The Alphabetical Index allows you to index on a 3-level key. Therefore, if you don’t already use the feature, first key will be you index fragment name (the name of your “separate indexes”).

As an example, I used first keys Index, People and Works. These will appear as names of your various indexes with the entries listed alphabetically below it.

Achieveing a more “separate” layout is just a matter of playing with the index configuration and paragraph styles.

Index configuration

Since we’ll have "separate indexes with their own headings, I untick Title in Type tab, *Type & Title. This suppresses the global “Alphabetical Index” heading generation.

Paragraph styles

The alphabetical index is controlled by Index 1 to 3 paragraph styles.

Contents 1 (level-1) is modified to have its text centred, bigger font size, bold with spacing above and below. Optionally, I added a forced page break in the Text Flow tab so that the index “fragments” are clearly separated.

Contents 2 (level-2 where we find the entries) is customised to remove the left indent (it made sense when level 1 is used for a primary key, but no longer is this case). You can adjust it for other effects.

Limitation and improvements

Since this is a hack on the built-in index feature, you still have a single index. This means all your fragments will be listed one after another. You can’t generate separate parts e.g. to have text between them.

The fragments appear in alphabetical order of their first key. You can eventually make profit of this to reorder the parts by prefixing the first key with a variable number of spaces if you can’t choose names with the “correct” sequence. But be carful because this will slightly shift the centred fragment “heading” and it can become noticeable.

Here is an example: AskLOMultipleAlphaIndex.odt (12.7 KB)
Note that formatting of the cited “work” does not transfer to the index (as is the case with all cross-references).

PS: update your LO version. 7.3 is at least 5-6 release late. My current release under Fedora 43 is 25.8.3.2.

That’s really clever, thanks.
I think it’s pointed me in a hopeful direction, however:

First, my alphabetical index is intended to make extensive use of first and second index levels already. I’m composing it in a spreadsheet and I’m up to about 1000 entries already.
So I’m thinking an alternative solution could be this:

  1. Use First Level “People” as you suggest
  2. Use First Level “Works”, with Second Level “Author”
  3. Generate the alphabetical index, and allow manual modification.
  4. Cut the “People” level, and paste the text as a separate table.
  5. Repeat fo the “Works” level. This will obviously have to be a final step once all the index entries are finalised and will no longer change places.

Do you think that will work? It sounds like a feature request to me. In fact the whole index management and entry interface could use an overhaul I think.

Unfortunately I can’t upgrade as you suggest. I’m using an old Mac from 2009 with OS High Sierra (10.13) and can’t upgrade the OS any more.