Apache OpenOffice (AOO) Bugzilla – Issue 23562
Chapter Numbers with Page Numbers in Tables of Contents do not work
Last modified: 2013-08-07 14:38:26 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.
Created attachment 11954 [details] OOo file with dodgy table of contents
Reassigned to ES
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.
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.
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?
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.
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.
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.
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.
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.
Yes please submit a sample!
Created attachment 12010 [details] M$ Word file with Table of Contents and n.n page numbers
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 ...
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
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?
btw: how can this issue be "new" ? its three years old.!?
cc myself
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.
Created attachment 43432 [details] Updated example
cc myself. I think, we can mark this issue as a duplicate of issue 53420.
ok Have added a reference from issue 53420.
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.
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"
added myself as cc
This issue should be seen in relation with issue 53420
Reset the owner.
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?
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 ***
closing