We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

alphabetical index referring to a different numbering than pages

asked 2021-04-01 13:30:11 +0200

pippopa9 gravatar image

updated 2021-05-31 18:42:23 +0200

Alex Kemp gravatar image


I am writing a book that contains ancient notarial acts. The sequence in which they are shown is as follows.

Archival reference
Act number. Summary description
Complete description

There are therefore hundreds of these elements.

In the alphabetical index I would like the items to refer not to the page, but to the act number. For example:


This means that act #4 concerns Item1 and Item3. And I can find information on Item2 in acts #336 and #451.

How can I achieve this?


edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2021-04-01 14:13:08 +0200

keme gravatar image

updated 2021-04-01 15:20:13 +0200

If act numbers occur in sequence, it is fairly straightforward:

Edit: Not looking good. See bottom of reply. Leaving my suggestion as is, for reference...

In your text

  • Set the act summary to paragraph style Heading 1 (press ctrl+1)
  • Enable numbering
    • Select menu item Tools - Chapter numbering
    • Select tab Numbering
    • Pick the number type as required (roman, arabic, alpha)
    • Set the starting point if your act numbers are not beginning at 1
  • OK

In the index settings

  • select Entries tab
  • In the structure field, click the #element to select it, and delete it.
  • Click the Chapter info button to insert element into index structure, and for content select numbers only*
  • OK

You may need to remove preexisting act numbers, or format the automatic numbers to be invisible (e.g. "white on white") using a custom character style.

Also, when the numbering is not in sequence, you need to manually alter the chapter number in act summary paragraph properties.

The summary is lost with my suggestion above. You can have a kind of solution by not joining identical entries. See attachment. While Ajlittoz' solution is perhaps more manual labor, it yields something that looks decent.

edit flag offensive delete link more


@keme: you forgot to mention this is no longer Alphabetical Index but Table of Contents.

ajlittoz gravatar imageajlittoz ( 2021-04-01 14:31:03 +0200 )edit

... this is no longer Alphabetical Index but Table of Contents.

No, it is not. The alpha index remains an alpha index. You just remove page number and add chapter number on the entries. No change to the type of cross reference.

  • It still lists index entries, not headings.
  • It is still in alpha order, not in chapter sequence order.

Edit: I get it now: you lose the multiple entries. Looking into that...

keme gravatar imagekeme ( 2021-04-01 14:43:56 +0200 )edit

Thanks for your answer. If you read my previous question https://ask.libreoffice.org/en/questi... you can understand better my needs. However the line with Act number. Summary description is a paragraph with style called Summary.

So I've tried to follow your instructions with chapter info. It works, but I have a problem: only the last reference to the chapter appears in the index. That is to say that if Item1 is contained in chapter 1,3,5 (i.e. in acts 1,3,5) I see

Item1 ............5

It looks like the Combine identical entries option in Type tab doesn't work for chapter info. In fact if I disable this option I can see all references listed


Is that a bug or I made a mistake?

pippopa9 gravatar imagepippopa9 ( 2021-04-01 15:06:11 +0200 )edit

No bug. No mistake. That is how it works if you can use that.

keme gravatar imagekeme ( 2021-04-01 15:21:13 +0200 )edit

So, you are telling me that pages references can be combined, chapters references cannot be combined? Edit: I've download your document example. I've see exactly what I've achieved in my document. Problem still exists because I need identical entries to be combined.

pippopa9 gravatar imagepippopa9 ( 2021-04-01 15:23:05 +0200 )edit

@keme: very cute trick, I'll remember it

@pippopa9: Alphabetical Index is processed very special in Writer. And only page information is merged into a single # code. Since cjapter information goes into a different code CI, it will not be merged by the engine.

ajlittoz gravatar imageajlittoz ( 2021-04-01 15:53:19 +0200 )edit

answered 2021-04-01 14:07:09 +0200

ajlittoz gravatar image

Unfortunately, this is not possible directly.

My suggested workaround is to modify slightly the index entries. You didn't describe how you create them. The workaround may be more or less tedious depending on your procedure.

When the entry is created, in the dialog, at the end of the Entry field add the act number, e.g. between parentheses like (1662-Salem-ab) or after some punctuation like - 1662-Salem-ab.

In the alphabetical index, remove the page numbers. Right-click on the existing index and Edit index. Go to Entries tab.

In the Structure line, click on E# to select it and press Del on your keyboard. Do the same on T. OK

This can also be done when inserting initially the alphabetical index.

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!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

edit flag offensive delete link more


Are you telling me to enter the act number as the 2nd key? I tried but the entries in the alphabetical index are not grouped (combined) as I need.

pippopa9 gravatar imagepippopa9 ( 2021-04-01 14:44:34 +0200 )edit

Entering act number into second key is a possiblility but you'll get as many lines as there are second keys.

Unfortunately, merging works only for the # descriptor (page number).

I have not thought deeply about it, but you could perhaps build some sort of bibliography, provided your "references" are all grouped together.

The built-in bibliography is nothing but a database. Therefore, it can be processed through Base to output an .odt file with the report generator. You can then produce two Writer documents: one for the complete "catalog" of your references which is included in your book as a chapter of its own; the second for the index. Since you are in control, you can do whatever you like with the results of the queries. For instance, merge the act numbers into a single paragraph.

This index is then inserted into your book.

ajlittoz gravatar imageajlittoz ( 2021-04-01 16:04:50 +0200 )edit

Thanks for your time. Frankly, the bibliography method (which I should verify to see if I can get exactly what I want) seems too laborious, too complex. I think the only way is to manually write an index with references. Therefore, I understand that the fastest solution is to automatically create the index that considers the Chapter Info where items are shown not combined (as said above) and then, reading the index, manually create the "advanced" version with the combined entries.

pippopa9 gravatar imagepippopa9 ( 2021-04-01 17:10:44 +0200 )edit

Don't read and create a manual index. When you create the index, uncheck Protected against manual changes in the Type tab. You can also uncheck it on an existing index with a right-click and Edit index.

Then you can modify the index, merging the entries as you like. Drawback: whenever you update the index, your changes are lost. So better do it when the book is in its final state. During editing and authoring, you can live with the unmerged entries.

ajlittoz gravatar imageajlittoz ( 2021-04-01 18:04:59 +0200 )edit

Yes, I have my alphabetical index (as keme suggested me) with protection against manual changes. But I cannot merge entries, so when the work is completed I will write manually the index merging the entries. The reference is not to page number but to act number, I don't care about page changes.

pippopa9 gravatar imagepippopa9 ( 2021-04-12 18:46:23 +0200 )edit

From the sample in your other question, it happens that your "index" is not an alphabetical index but a secondary TOC. It is easy to format automatically this table the way you like because numbering information is E#.

I changed the C:\fakepath\sample_for_forum.odt sample file according to how I can understand your goal.

ajlittoz gravatar imageajlittoz ( 2021-04-12 19:18:19 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-04-01 13:30:11 +0200

Seen: 46 times

Last updated: Apr 01