Change the order of an index

I want to change the order of an index to Biblical book sequence.
I am editing a manuscript written in Writer. The document contains Biblical references which I can index but they appear in page number sequence. How can I revise the order of the index to match the standard sequence of Biblical books? (I do appreciate that I might have to link to a separate file containing that sequence).

Please edit your question (don’t use an answer, which is reserved for solutions) to provide an example of what you get and what you want. Index entries are sorted on indexing name, then on page number. Consequently entries should appear in standard alphabetical order (of course, this is not traditional Bible book order).

The solution I have in mind makes tricky use of styles. Are you familiar with paragraph styles at least?

(Too busy to wait for your edit - I’ll give my suggestion according to my understanding of the question)

My initial document state is the following

initial

where “words” Aaa and ccc have index entries aaa and ccc. Of course they appear in the index in their natural alphabetical order and you can’t change that.

I then edit the index entries throughout the document: put the cursor in front of the first index entry in the text (not in the “Index” table itself") and Edit>Reference>Index Entry. Use the 1st key field to put there a sort key (something like ‘01genesis’, ‘02exodus’, etc.) so that these keys are “alphabetically” in the desired order thanks to the numeric prefix – don’t forget initial zeroes to have a constant-length prefix. In my case, I used ‘a’ and ‘z’ to reverse the result. Edit all your index entries.

second step

Note: this snapshot is taken with an old version of Writer and does not show the navigation arrows allowing to quickly jump to the next/previous index entries.

When you refresh the index table, this is what you get:

updated index

Close to the desired result, but for the key lines.

The key line are formatted with Index 1 paragraph style. Open the style sidepane with F11, right-click on Index 1, Modify and go to Font Effects tab. Check Hidden box. Push OK. If View>Formatting Marks is enabled (recommended), the key lines still display with a dotted underline. This is visual feedback for hidden text. Hidden text does not print, as shown in print preview:

image description

You may object that your entries in the index are not aligned left on the margin. Your entries are now formatted with paragraph style Index 2 because they are no longer on the first level. Customise Index 2 to your liking.

EDIT 2019-06-07

To remove the leading line (the dots associated with the tab), Insert>Indexes & Tables>Indexes & Tables (or right-click on the index table and Edit Index/Table), go to Entries tab. In the Structure line, click on the T button. Its properties/attributes are then displayed. Remove the dot in Fill character box.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

Thank you for your prompt and very helpful answer. I was on the right lines but tripped up over some incorrect index entry procedures which knocked me off course. Your help has been invaluable. All I’ve got to figure out now is how to get rid of the dotted lines (tab separators).

Thanks for the additional help - the index is now exactly as I wanted it.

I have built a file to do such, to Sort Bible verses, and it also does much more, it has run good for years for me. To download a copy got to, bit.ly/faithalone <-do not use . com. I would like to leave a copy here but its a little to big, 1,300kb. It will sort first Bible books then chapter and last the verses. And has room to put notes next to each verse.
For Sort button’s to work, set macro’s at Medium….In, Tools/Option, LibreOffice/Security…Macro Security… Medium…Do before opening file, or adjust macro’s then close the file and reopen.
Enjoy!