Bug 104182 - [VIEWING] Table of contents - create index for specified discontinued levels
Summary: [VIEWING] Table of contents - create index for specified discontinued levels
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.3.1 rc
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2016-11-26 09:47 UTC by ratrace
Modified: 2023-02-21 21:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
example-document-inGreek (181.34 KB, application/vnd.oasis.opendocument.text)
2016-11-26 09:47 UTC, ratrace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ratrace 2016-11-26 09:47:57 UTC
Created attachment 129020 [details]
example-document-inGreek

It would be helpful if i could insert a table of contents for specific levels, that i will choose in a "form" of range (from heading (level) 2 to heading (level) 3), for my document.

For example, in the document i'm attaching (it is in Greek language), i would like to be able to insert a table of contents, after every occurrence of heading 2, which will list heading 3 entries of ONLY that heading (heading 2). The result i want to have will be like,

ΑΡΘΡΟ 1 (Heading 2)
1-1. (Heading 3)
1-2. (Heading 3)
1-3. (Heading 3)

1. In the page number 6 of the document, at the end of the heading in the top of page press enter.
2. Press F10 and choose from "Insert menu" - "Table of Contents and Index" - "Table of Contents, Index or Bibliography".
3. In the "Create Index or Table of Contents" section of the "Type" tab, choose For "Chapter" and Evaluate up to level "3".

This is the place, where i think it would be helpful, to be able to choose the level of heading in the "For" and also to specify the headings which i want to include, for example from heading 2 to heading 3.
Comment 1 Heiko Tietze 2016-12-14 10:45:06 UTC
As the name TOC says it's used to list the whole content (with a limitation for those users who weirdly structure their documents with more than four levels). But introducing a 'from' option violates the core idea.

So why don't you go with an alphabetical or user-defined index? That requires to explicitly link a heading to the index but it has all flexibility you want. 

https://help.libreoffice.org/Writer/User-Defined_Indexes
Comment 2 Heiko Tietze 2017-01-03 15:58:00 UTC
Reading the ticket again I think the enhancement request is valid, more or less. The user-defined ToC works in the same way as regular headings. Both can be done based on the 'entire document' or for the current 'chapter'. The latter is almost what is requested here but works on top level heading (h1). 

The solution, if possible (needDevEval), is to have another option 'heading' in the dropdown 'Create Index or Table of Contents' that works for the current active heading, whether it is h2 as requested with a ToC for the childrens h3,h4 etc., or when started from h3 for the items below respectively. It makes sense to set a minimum value for the 'Evaluate up to level'.

The function should be available for all types.
Comment 3 Xisco Faulí 2020-03-09 13:28:22 UTC
Please add keyword 'needsUXEval' and CC 'libreoffice-ux-advise@lists.freedesktop.org' if input from UX is needed.
Comment 4 sdc.blanco 2023-02-21 21:47:16 UTC
(In reply to ratrace from comment #0)
> It would be helpful if i could insert a table of contents for specific
> levels, that i will choose in a "form" of range (from heading (level) 2 to
> heading (level) 3), for my document.
I believe this is now FIXED (based on bug 130318 ) or WFM.

In LO 7.6:

1. Place cursor after the level 2 heading to be indexed.
2. Open ToC dialog, 
    select For: Chapter 
and set: Evaluate up to level: 3

Result:  As described in OP.

       Level 2 Heading
          Only level 3 headings