Apache OpenOffice (AOO) Bugzilla – Issue 98937
alphabetic index page number sort order with multiple page number formats and page counts odd
Last modified: 2017-05-20 11:22:44 UTC
I have a document, a book to be more precise, that has beginning page numbers in lower case roman numerals, and then restarts the numbering at 1 with regular numerals when the main text starts. This is very common in books. The preface and table of contents are usually numbered differently before the main text. When I create an alphabetic index, the roman numeral page numbers and the regular page numbers show up, but they are sorted together as in the following example. Dog....2,x,15,xvi It seems more intuitive and appropriate that they should be sorted as follows: Dog....x,xvi,2,15 Or, at least have an option of which method one prefers, as this is the actual order in which they are found within the book. Perhaps this is another issue, but if one of the page styles has "no number format" then the index will look like this. My table of contents, for example, had no page number format for awhile, which in some cases may be wanted. Dog....2, ,15,xvi In this case, it seems the missing entry should be removed entirely. I'll try to create a small document that demonstrates this and attach it asap. OpenOffice rocks, and I appreciate all the work and effort that goes into it.
Created attachment 59972 [details] Alphabetic Index Sort Order With Multiple Page Number Formats
In creating the example file, I discovered some other discrepancies, one of them being a major problem. If you have a roman numeral page #iii and a regular numeral page #3, they step on one another in the index. In other words, only one 3 will show up, and you can't predict which one. Sometimes it's iii and sometimes it's 3. Also, If you have ix, 7, 8, and you group pages with dash or pp, it will produce 7-ix, which is incorrect, since ix is way before 7 or 8 within the document.
When someone does delve into this issue, they may want to consider issue #32392 as well, since they seem related and are likely in the same code segment. If I'm wrong, I apologize in advance.
MRU->OS: look at the index in the attached document. The page numbers for combined entries are not in the expected order: "Dog....i, ,3,v,7,8,ix" instead of "Dog....i,v,ix,3,7,8". Also note, that a suppressed page number type should not be displayed in the list.
I don't see a connection to issue 32392. That one is about including footnote text into the index. The page numbers are not sorted by the position in the document but simply by the number value. You could also restart the page numbering with page 1 and you will experience a similar problem. In real life it simply doesn't make sense to have mixed page numbering and at the same time have index marks on such sections. Usually the Roman numbering is used for the content index or an appendix that is not a source for the alphabetical index. Index entries on unnumbered pages are also more or less a design problem. They should probably be removed from the index.
Then, there should be a way to indicate which pages you are actually wanting the alphabetic index to cover, rather than having it do the whole document.
Created attachment 60110 [details] Basic Macro that (almost) fixes everything about the Alphabetic Index
Will attach an example of the alphabetic indexes before and after the macro are run. The macro isn't fully complete, and there are comments near the top that explain the things left todo. This macro with just a tiny bit of extra work, could do everything required.
Hmmm, should have added that this macro also add words found in footnotes to the index, so issue #32392 is also addressed and "solved".
*** Issue 99233 has been marked as a duplicate of this issue. ***
Reset assigne to the default "issues@openoffice.apache.org".