Issue 98937 - alphabetic index page number sort order with multiple page number formats and page counts odd
Summary: alphabetic index page number sort order with multiple page number formats and...
Status: ACCEPTED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 3.0
Hardware: Unknown All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 99233 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-02-05 22:41 UTC by andrewwilcox
Modified: 2017-05-20 11:22 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Alphabetic Index Sort Order With Multiple Page Number Formats (9.68 KB, application/vnd.oasis.opendocument.text)
2009-02-05 23:27 UTC, andrewwilcox
no flags Details
Basic Macro that (almost) fixes everything about the Alphabetic Index (20.90 KB, text/plain)
2009-02-11 21:37 UTC, andrewwilcox
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description andrewwilcox 2009-02-05 22:41:08 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.
Comment 1 andrewwilcox 2009-02-05 23:27:49 UTC
Created attachment 59972 [details]
Alphabetic Index Sort Order With Multiple Page Number Formats
Comment 2 andrewwilcox 2009-02-05 23:31:12 UTC
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.
Comment 3 andrewwilcox 2009-02-05 23:38:53 UTC
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.
Comment 4 michael.ruess 2009-02-10 16:07:41 UTC
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.
Comment 5 Oliver Specht 2009-02-10 17:04:31 UTC
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.
Comment 6 andrewwilcox 2009-02-11 01:12:11 UTC
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.
Comment 7 andrewwilcox 2009-02-11 21:37:09 UTC
Created attachment 60110 [details]
Basic Macro that (almost) fixes everything about the Alphabetic Index
Comment 8 andrewwilcox 2009-02-11 21:38:31 UTC
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.
Comment 9 andrewwilcox 2009-02-11 21:39:33 UTC
Hmmm, should have added that this macro also add words found in footnotes to the
index, so issue #32392 is also addressed and "solved".
Comment 10 michael.ruess 2009-02-16 10:09:26 UTC
*** Issue 99233 has been marked as a duplicate of this issue. ***
Comment 11 Marcus 2017-05-20 11:22:44 UTC
Reset assigne to the default "issues@openoffice.apache.org".