### Bug description

I have been having trouble when writing a `.qmd` file that I want to have a static table of contents at the beginning with all the levels.

I am including the following yaml options at the beginning of the focument. 

```yaml
---
title: "My document"
format: html
editor: visual
params:
  solutions: false
toc: true
toc-location: body
toc-depth: 6
self-contained: true
---
```

Nonetheless, the table of contents only shows the level 1 headers.

I am running R studio build 554 (2022.07.01) and R 4.1.2 within Windows 11.

Changing self-contained or removing it altogether does not play a role. Neither does removing the parameters.

Please I need to solve this issue urgently.

Best.

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2022-09-08T20:09:34Z
juan-g-p
bug
v1.2
closed
Static table of contents not showing all the levels
https://github.com/quarto-dev/quarto-cli/issues/2366