Issue 23562 - Chapter Numbers with Page Numbers in Tables of Contents do not work
Summary: Chapter Numbers with Page Numbers in Tables of Contents do not work
Status: CLOSED DUPLICATE of issue 53420
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: PC Windows 2000
: P3 Trivial with 6 votes (vote)
Target Milestone: ---
Assignee: requirements
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-15 11:45 UTC by davidwlegg
Modified: 2013-08-07 14:38 UTC (History)
6 users (show)

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


Attachments
OOo file with dodgy table of contents (13.00 KB, application/x-compressed)
2003-12-15 11:59 UTC, davidwlegg
no flags Details
M$ Word file with Table of Contents and n.n page numbers (56.00 KB, application/msword)
2003-12-18 14:58 UTC, davidwlegg
no flags Details
Updated example (16.51 KB, application/vnd.oasis.opendocument.text)
2007-02-28 12:26 UTC, Giuseppe Castagno (aka beppec56)
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description davidwlegg 2003-12-15 11:45:53 UTC
Did you try :
> First you need to use the correct style for the chapter headings. I'd
> suggest  "Heading 1" style. 
> You also need to turn on numbering for this style : "Tools" -> "Outline 
> Numbering...", select level 1 ( which normally has paragraph style
"Heading 
> 1") and change it's Number attribute from "None" to "1,2,3.." and press
OK.
> 
> Now "Insert" -> "Indexes and Tables" ->  "Indexes and Tables"
> and in the "Entries" tab in the "Structure" definition place your cursor
in 
> the text field between the " T " and the " # " and click on the "Chapter
no" 
> below and then OK.>

Tried that and it produces a TOC like this (but with dots as separators):

LIST OF CONTENTS
1.SCOPE	1.1
1.1Identification	1.11
1.2Purpose	1.21
1.3Introduction	1.31
2.REFERENCED DOCUMENTS	2.1
2.1Government Documents	2.11
2.2Non-Government Documents	2.21
2.3Eurofirst Documents	2.31
3.VERSION DESCRIPTION	3.1
3.1Inventory of Materials Released	3.11
3.2Inventory of CSCI Contents	3.21
3.3Class I Changes Installed	3.31
3.4Class II Changes Installed	3.41
3.5Adaptation Data	3.51
3.6Interface Compatibility	3.61
3.7Bibliography of Reference Documents	3.71
3.8Operation Description	3.81
3.9Installation Instruction	3.91
3.10Possible Problems and Known Errors	3.101
4.NOTES	4.1
4.1Definitions	4.11
4.2Abbreviations	4.21

It works OK for Level 1 headings, but the Level 2 headings which are "Header
2" styles don't seem to work. Writer inserts the section number instead of
the Chapter number, ie. it inserts '1.1' into the TOC instead of just '1'.

Any further insight would be appreciated because this is the only thing
stopping me from moving a whole load of stuff from WP6 into OOo, thus
avoiding M$ Word.
Comment 1 davidwlegg 2003-12-15 11:59:02 UTC
Created attachment 11954 [details]
OOo file with dodgy table of contents
Comment 2 h.ilter 2003-12-15 16:43:08 UTC
Reassigned to ES
Comment 3 eric.savary 2003-12-16 14:34:11 UTC
Please rewrite the description and summary of this issue:
- What is exactly the problem?
- How do you reproduce it (please describe shortly and precisly)?

Please have a look at:
http://www.openoffice.org/bugs/bug_writing_guidelines.html
Especially concerning "summary" and "description".

When done, please reassign.

Thank you.
Comment 4 davidwlegg 2003-12-16 16:55:22 UTC
A more concise description of the problem:

I created a doc with several chapters and the page numbering in the header goes 
something like 1.1, 1.2, 1.3, 2.1, 2.2, 3.1, 3.2, 3.3 etc. The attached file is 
an OOo V1.1 Word Processor file and is this doc.

The table of contents is the problem. It looks like this (cut down):

1.SCOPE..........................1.1
1.1Identification...............1.11
1.2Purpose......................1.21
1.3Introduction.................1.31
2.REFERENCED DOCUMENTS...........2.1
2.1Government Documents.........2.11
2.2Non-Government Documents.....2.21
2.3Eurofirst Documents..........2.31

When I inserted the Chapter number into the table of contents, instead I got 
the paragraph number. For example, 

2.2Non-Government Documents.....2.21

should have been:

2.2Non-Government Documents.....2.1

I tried it on Linux (RH9 with OOo V1.1) too and got the same result.
Comment 5 eric.savary 2003-12-16 17:56:21 UTC
In your example, the chapter number of "Non-Government Documents" is 2.2.
The entry structure shows E# = "2.2"
So if you insert the E# once in the structure, you will get once again "2.2"
Structure: E# E E#
Result:    2.2Non-Government Documents 2.2

Or did I miss something?
Comment 6 davidwlegg 2003-12-17 10:08:42 UTC
No that's not right.
The chapter containing paragraph 2.2 is chapter 2, not chapter 2.2.
If you look at the header in the attached document, you can see that the page 
number is composed of the chapter number followed by the page number within the 
chapter, so Chapter 2 Page 2 is enumerated in the header as page 2.2. So, the 
Chapter number that ought to be inserted into the table of contents is 2, not 
2.2 (where the two digits are separated by whatever the user chooses, in y case 
a dot).

The correct TOC entry would then be:

2.2Non-Government Documents........2.1

ie. Chapter 2, page 1 (within the chapter).

Hope that helps. Cheers.
Comment 7 eric.savary 2003-12-17 11:39:08 UTC
I must admit I've never seen such a way to format a TOC:
Entry name..............<up 1 level>.<page number>
Is there a specification about this somewhere.

Anyway: that you call the first level of ths outline a chapter, a section, a
title or whatever, 1, 1.1, 1.1.1 are the different level of the *same* outline.
Thus, when you ask the TOC to display the numbering of the current entry (E#) it
may display 1 or 1.1 or 1.1.1 depending on the level of this entry.

Displaying the numbering of an upper level in the current entry is not possible
in OOo.
 
Comment 8 davidwlegg 2003-12-17 12:04:53 UTC
WP6 and M$ Word can do it.

I agree that it is rather weird.
There is a Eurofirst spec for the format that I can't give you.
However, the .sxw file attached to this issue is a fair example.

The aspect of this that looks like a bug is that when you ask the OOo word 
processor to insert a chapter, it actually appears to insert the multi-level 
section or paragraph number.
Comment 9 eric.savary 2003-12-18 13:31:39 UTC
Please tell me how to do it in Word...

Chapter number and paragraph number are the same when chapters and numbered
paragraph are part of the same ouline. Like in this case.
Comment 10 davidwlegg 2003-12-18 13:58:39 UTC
I don't know how to do it myself. I have always used a template with it already 
set up. I could send you a small Word file as an example if you like. I would 
have to cut it down in size a bit first, but I'mm willing to do that if it will 
help solve this one.

When OOo converts the Word doc, it converts the TOC into straight text, ie not 
into an equivalent TOC.
Comment 11 eric.savary 2003-12-18 14:02:00 UTC
Yes please submit a sample!
Comment 12 davidwlegg 2003-12-18 14:58:30 UTC
Created attachment 12010 [details]
M$ Word file with Table of Contents and n.n page numbers
Comment 13 davidwlegg 2003-12-18 15:03:46 UTC
Sorry, need to qualify what I just said. StarOffice 6.0 converts the toc.doc 
file, leaving the TOC as plaintext. OOo V1.1 on NT4 only does half of the TOC. 
It has to be seen ...
Comment 14 eric.savary 2003-12-18 15:25:38 UTC
Ok I see how it is done.
Anyway it is a pretty odd way to display a TOC.
Word does not have an automatism to do it. The sub chapters have sequence fields
that the TOC can evaluate.
This is not a standard feature but really tinkered.
Therefore it's an enhancment.

ES->BH: please avaluate
Comment 15 molnium 2006-07-11 10:49:51 UTC
proposed solution:

just add the "format field" dialogue (as a right click on the coresponding field
in the "toc edit" dialogue) which can be invoked when having manually inserted
for example "page number" or "chapter number". 
In this dialogue one can set up to which number of sub-headings the number is
displayed.

Would this be a great effort to do?
Comment 16 molnium 2006-07-11 10:51:19 UTC
btw: how can this issue be "new" ? its three years old.!?
Comment 17 Giuseppe Castagno (aka beppec56) 2007-02-23 17:08:39 UTC
cc myself
Comment 18 Giuseppe Castagno (aka beppec56) 2007-02-28 12:25:16 UTC
The writer document I'm going to attach is an updated version of the attachment
in #desc2 above.
I created it with a patched version of OOo, so the TOC cannot be regenerated
with a standard OOo, but the resulting TOC can be seen.

I'd like to know if this is the wanted result.
Comment 19 Giuseppe Castagno (aka beppec56) 2007-02-28 12:26:58 UTC
Created attachment 43432 [details]
Updated example
Comment 20 Oliver-Rainer Wittmann 2007-03-01 06:23:19 UTC
cc myself.

I think, we can mark this issue as a duplicate of issue 53420.
Comment 21 davidwlegg 2007-03-01 10:09:33 UTC
ok

Have added a reference from issue 53420.
Comment 22 lendo 2007-09-14 16:31:50 UTC
The feature davidwlegg initially described is common in my company and it's not
odd. It's simple and clear for long documents. My comment to this issue (if I
were the initiator) would be:

With fields it is possible to create a page number with a first level chapter
number on each document page (header, footer or wherever): 1-1, 1-2, 1-3, ...

That's needed for long documents (e.g. instruction manuals) when each chapter
should start with page 1. You can refer to page 1-2, 2-15, ... to identify the
right chapter and page.

But in indexes/table of contents it is not possible to make the same
classification analogous to the page numbering system created with fields.

In the "Entries" tab of the "Insert Index/Table" dialog box it is possible to
insert the chapter number of each (heading) level, but then the numberin system
looks like: 1-1, 1.1-2, 1.2.15-7 and not 1-1, 1-2, 1-7. So, a reader will be
confused about the different page numbering system of the TOC and the pages itself.

Suggestion:
It should be possible to insert fields in the "structure and formatting" form of
the "Insert Index/Table" dialog box that update automatically when the index/TOC
will be updated.

Or at least it should be possible to insert a first level chapter number in the
"structure and formatting" form of the "Insert Index/Table" dialog box to create
page numbers like 1-2, 5-37.
Comment 23 lendo 2007-09-18 20:28:05 UTC
After another look at the "AutoCaption" feature I think this bug shows an
inconsistency in presentation of "Indexes and Tables of Contents".

Within "table of figures" it's possible to list all figures with chapter numbers
and figure numbers by the use of "AutoCaption" > "Numbering captions by chapter"
(with customizable level and separator) - but it's not possible to customize
chapter+page numbering.

That's not logical: a document with table of figures with chapter+figure
numbering and no equal chapter+page numbering.

e.g. "Figure 1-3: Purpose graph ...... 1.2-5" instead of properly
     "Figure 1-3: Purpose graph ...... 1-5"
Comment 24 cno 2007-10-01 15:21:48 UTC
added myself as cc
Comment 25 Oliver-Rainer Wittmann 2007-10-02 08:39:49 UTC
This issue should be seen in relation with issue 53420
Comment 26 bettina.haberer 2007-10-02 08:52:23 UTC
Reset the owner.
Comment 27 davidwlegg 2008-05-21 12:30:22 UTC
This one would have been really good a couple of years ago, but is now of
minimal value. Suggest we close it so as not to waste people's time.  What does
everyone else think?
Comment 28 Oliver-Rainer Wittmann 2008-05-21 13:28:35 UTC
issue is solved by beppec56 in cws beppec56index01 for OOo 3.0 Beta - see issue
53420.

Thus, this issue can be closed as a duplicate

*** This issue has been marked as a duplicate of 53420 ***
Comment 29 Oliver-Rainer Wittmann 2008-05-21 13:30:53 UTC
closing