Bug 84700 - Page Number field format not reflected in indexes i.e., does not override page style definition (Page tab > Layout settings > Format)
Summary: Page Number field format not reflected in indexes i.e., does not override pag...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields-Page-Number
  Show dependency treegraph
 
Reported: 2014-10-06 03:57 UTC by Joel Madero
Modified: 2017-06-27 19:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple Example (12.62 KB, application/vnd.oasis.opendocument.text)
2014-10-06 03:57 UTC, Joel Madero
Details
Slightly More Complex Example (14.02 KB, application/vnd.oasis.opendocument.text)
2014-10-06 04:17 UTC, Joel Madero
Details
Multi-lingual example using page styles and page number field formatting (16.22 KB, application/vnd.oasis.opendocument.text)
2014-10-11 09:27 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Madero 2014-10-06 03:57:44 UTC
Created attachment 107387 [details]
Simple Example

Ubuntu 14.04 x64
LibreOffice 4.3.2.2 release

Steps to Reproduce:
1. Open writer
2. Insert footer ("default style")
3. Insert -> Field -> Page Number

Observed: Page number appears as 1

4. Highlight the 1
5. Right click on highlighted 1
6. Left click on "fields..."
7. Select (Roman i,ii,iii)

Observed: 1 changes to i

8. Select main body of page (left click on main body outside of footer)
9. Write some text, highlight the text and push ctrl + 1

Observed: Text becomes header style 1

10. Insert -> Indexes and Tables -> Index and Tables... -> Push Ok in dialog

Observed: You get a table of contents but the page number is shown as 1 instead of i.

Expected: Page should reflect the style of the page number on the page if a page number in fact exists.

This is particularly problematic when you have multiple page styles and you have pages i,ii,iii..... and then you restart the page numbering with regular page numbering (ie. 1,2,3,4) because you can't distinguish between page i and page 1 which are not the same.

This also affects all the other kinds of indexes - for lawyers this can be a problem when trying to use LibreOffice for something like a table of authorities: http://www.law.indiana.edu/front/etc/section-215-amicus-8.pdf (see page 4 of that pdf to get an example of what one of these look like)


Attachments:
1. Simple example showing the issue.
2. More complex example showing how things can become more erroneous when using multiple styles.
Comment 1 Joel Madero 2014-10-06 04:17:35 UTC
Created attachment 107388 [details]
Slightly More Complex Example
Comment 2 Joel Madero 2014-10-06 04:18:19 UTC
Added "Slightly More Complex Example" - as you can see the TOC shows two entries both showing "1" as the page where the headers are but it should be "i" and "1" - without the differentiation, it can cause confusion
Comment 3 Terrence Enger 2014-10-06 05:17:16 UTC
I see the reported behaviour, and I agree that it contradicts my
expectations.

This behaviour goes back as fas as the 43all bibisect repository
version oldest.  Does that mean "inherited from OO"?

And the behaviour is visible on Windows, too.
Comment 4 Cor Nouws 2014-10-06 07:12:36 UTC
Hi Joel,

(In reply to Joel Madero from comment #0)

> 4. Highlight the 1
> 5. Right click on highlighted 1
> 6. Left click on "fields..."
> 7. Select (Roman i,ii,iii)

When I do this via Format > Page > Page ... Layout settings > Format

the correct numbering format does appear in the TOC.
(Ubuntu 4.3.2 - but I guess it's like that in all versions)
Comment 5 Cor Nouws 2014-10-06 07:47:05 UTC
Ah Joel, if this works OK for you too, pls update your blog ;)
Comment 6 Joel Madero 2014-10-06 16:23:17 UTC
Hi Cor -

Indeed this works but I still think it's a valid enhancement request (definitely not a bug). If you have a page number field on the page, and have changed the format, the TOC should reflect this (maybe the Format in Format -> Page should automatically update to reflect the field style you choose).
Comment 7 Joel Madero 2014-10-06 16:29:24 UTC
@Terrence - I believe that this is an enhancement request so no need to update version field. While it does contradict expectations, the "correct" way to doing what I'm trying to do has been explained by Cor. That being said - I do indeed think it could be better if it worked the way that you and I expect it to  :-D
Comment 8 Cor Nouws 2014-10-06 21:59:05 UTC
Hi Joel,

(In reply to Joel Madero from comment #6)
> Indeed this works but I still think it's a valid enhancement request
> (definitely not a bug). If you have a page number field on the page, and
> have changed the format, the TOC should reflect this (maybe the Format in
> Format -> Page should automatically update to reflect the field style you
> choose).

I guess that's better yes - though of course I hate direct formatting for many good reasons :)
Possibly this is related to the overall issue that direct formatting on headings is not retained in the TOC. (there is an issue for this ..)

Cheers
Cor
Comment 9 Owen Genat (retired) 2014-10-11 06:39:57 UTC
(In reply to Joel Madero from comment #6)
> Indeed this works but I still think it's a valid enhancement request
> (definitely not a bug). If you have a page number field on the page, and
> have changed the format, the TOC should reflect this 

Joel, I have no problem with an index using the format defined in the page number field.

> (maybe the Format in Format -> Page should automatically update to reflect 
> the field style you choose).

By all means use a field format to override a page style definition (i.e., in terms of the ToC, as indeicated). A change in field however should never update a style definition of any type, page or otherwise. Page styles are a very powerful and essential aspect to creating complex documents. This enhancement will possibly simplify the ability to get a desired result, but it will come at a cost, in the same way directly applied formatting comes at a cost (as Cor has indicated).

Summary amended for clarity.
Comment 10 Joel Madero 2014-10-11 07:07:05 UTC
Hey Owen -

Can you provide an example where you'd want the page number field to show i but you'd want the page number in the format -> page to be set to 1,2,3? This seems very strange to me. To say the least I think a field that is set to i,ii,iii should change the page format numbering but then a user is free to change it back. Or an option should be available that links the two....

Like I said, I can't see a practical reason why you'd want them to differ.
Comment 11 Owen Genat (retired) 2014-10-11 09:27:13 UTC
Created attachment 107706 [details]
Multi-lingual example using page styles and page number field formatting

(In reply to Joel Madero from comment #10)
> Can you provide an example where you'd want the page number field to show i
> but you'd want the page number in the format -> page to be set to 1,2,3?
> This seems very strange to me. To say the least I think a field that is set
> to i,ii,iii should change the page format numbering but then a user is free
> to change it back. Or an option should be available that links the two....

The more I think about this, the more difficult it seems to use a page number field format as the basis for an index entry. A field can be inserted multiple times, in each case with a different format, on a single page. Which field (and corresponding format) should take precedence? Refer attached.

Imagining a situation where this seems valid is less important, because ultimately if a user can do something, then it is likely the corresponding use case will occur at some point. One example however that comes to mind is multi-lingual documents, where page numbers are required to be set in two or more languages.