How to add an element in outline?

Dear all,

I am creating a template whose outline requires some customization. One of them is related to the part of the document. Currently, the function for creating part has the following structure:

#let part(title) = {
// Definition of the style in the document
...

// Definition of the elements for the outline
 show heading: none
 heading(numbering: none)[...]
}

This approach has several drawbacks in my opinion:

  1. The customization of outline.entry for level-1 headings affects also the part function
  2. A possible way to provide a customization is to use e.g. headings(level: 10, numebering :none) to define a unique customization. In this case, however, I can’t use #set outline(depth: 3) (because the heading for part won’t be display anymore).
  3. I had a look at this thread, but I would prefer a less hacky solution if exists.

Do you have any idea or indication for including styling part just as the LaTeX \addcontentsline{}.

Thank you

Are you by any chance looking for something like this: How can I customize the outline entries based on the different parts' labels? - #7 by Andrew

It is indeed a possible solution. It is the more direct solution we can imagine, but it has several flaws, if the document is only made with chapters.

I will continue to look for a solution that fits my needs. If I find one, I will post it here.

Thank you @vmartel08 for pointing to this thread.

You also may want to check how some packages implement Part:

I am sure there are more.