Suppose you have a book with the following structure:
and that you need partial TOCs on each chapter.
When you create a TOC it is possible to build it "for the chapter", but Writer considers as "chapter" only level 1 headings. That means you cannot set "Part" as level 1 and "Chapter" as level 2 because partial TOCs will not work as intended.
There are several workarounds for the limitation, but none of them are optimal because they imply more manual work on building the TOCs. Hence the proposal: make it possible to choose which outline level is considered as "chapter" for the TOC.
Related enhancement request:
Bug 94218 - footnote numbering per chapter: define outline level that resets numbering
Regina: is this possible with the current ODF?
No. The attribute is text:index-scope and it has the literal values "document" and "chapter". For chapter the description is: "A chapter consists of all those paragraphs and headings which have the same immediately preceding heading with outline level 1." So the level is explicitly named as "1".
Ok, so it is not possible to implement this enhancement request in LibreOffice today.
Nonetheless I'll change the status to NEW with metabug "ODF-spec". Maybe sometime in the future ODF will allow such feature, then it's ready to implement. Other users can find this bug request easier with no resolution which will prevent duplicates.
From my point of view I would appreciate such feature.
It seems like the following could be used for making a partial TOC.
Insert > Table of Contents, Index, Bibliography > Type tab
Create From section
check Additional Styles
open "Additional Styles" dialog
choose which PS to include and at what level.
Or have I misunderstood?
(In reply to sdc.blanco from comment #4)
> It seems like the following could be used for making a partial TOC.
Yes, it could be a workaround. The problem is, that you have to exclude the PS "Chapter" from chapter numbering to assign level 1 in that PS.
Created attachment 170738 [details]
Using Assign Styles to set (arbitrary) outline levels for a TOC
(In reply to Dieter from comment #5)
> The problem is, that you have to exclude the PS "Chapter" from
> chapter numbering to assign level 1 in that PS.
Please see attached, where Chapter (Heading 1?), is not excluded from Tools > Chapter Numbering, but appears as Level 2 in the TOC.
Is that what was needed/requested?
If so, why is the attached a "workaround"?
Your example file doesn't match the original problem:
It has the tite "Appendix" and two headings with PS "Heading 1". You've created a TOC for the whole document, but bug reporter asked for TOC for each chapter.
Steps to reproduce the problem
1. Open attachment 170738 [details]
2. Tools => Chapter Numbering
3. Level 1 = PS Appendix
4. Level 2= PS Heasding 1
5. Place cursor in paragraph that begins with "I guess that"
6. Insert => TOC => Tab "Type"
7. Create index for chapter
8. Create from Additional styles (deselect "Outline" and "Index Marks")
9. Assign Styles => Assign Style "Heading 1" to level 1 => O.K. => O.K.
TOC with three entries (because whole doicument ist counted as one chapter due to settings in chapter numbering)
TOC with one entry (because "Heading 1" is counted as "chapter", because (for example) cursor is placed at the beginning of this chapter)
As done in a linked bug (https://bugs.documentfoundation.org/show_bug.cgi?id=130318) here is the link to a use case for this feature.
It's the current text of the Italian Fire Safety Code.
Here it is at Github:
See the pdf export at:
I think that a feasible solution for the implementation of this feature, that does not break backwards compatibility, is the following idea from Heiko Tietze:
I would be ready to contribute financial resources for solving this.
Thank you again.