How to exclude level 3 and 4 headings from the outline/Contents

Still very new here, so another basic question.

I have 4 levels of heading, but only want levels 1 and 2 to appear in the Outline/Contents. I have read the tutorial and references on Headings and the “outlined” parameter, but I can’t work out how to set (outlined: false) for levels 3 & 4 only. My #show rules for those headings are:

#show heading.where(level: 3): set text(16pt, weight: "semibold")

#show heading.where(level: 4): set text(14pt, weight: "semibold")

but when I try to formulate a set rule, it removes all heading levels from the outline, as I can’t figure out how to confine it to levels 3 and 4, and otherwise outlined: false always returns an error when I try to include it, in whatever way, in the show rule.

Can someone please advise?

Thanks

Use the outline.depth parameter and set it to 2: #outline(depth: 2).

2 Likes

Thank you very much. My problem is that (in spite of my age!) I’m pretty new to this and have no coding experience, so, although I think I understand the principles, it’s the details of implentation which I struggle with, and I frequently cannot relate the examples to what I am trying to do…

But thank you for not only helping me solve this one, but en passant I see the solution to one of the next issues on my list.

:smile:

1 Like