How to have page numbering in outline only for level 1 headings?

Hi there,
so at the moment i am looking for a way to design my outline. I am using level 1 and 2 headings only and I would like the page indication numbering on the right only to be visible for level 1 headings in the outline.
If anybody knows a way to do this, please let me know.
Kind regards

Hi, welcome to the Typst forum! I’ve edited your question title to follow the guidelines, see here for more info on that.

Regarding your question, there’s an example in the documentation that’s very close to what you want I think:

#show outline.entry: it => link(
  it.element.location(),
  // Keep just the body, dropping
  // the fill and the page.
  it.indented(it.prefix(), it.body()),
)

#outline()

In your case, you want to do this configuration only for level 2 headers, so replace #show outline.entry with #show outline.entry.where(level: 2).

1 Like

Hi @staufers18, please don’t forget to mark the response as the solution if it solved your problem, so that others can more easily find it later. As far as I can tell, it works perfectly for what you described.