Skip to main content

Invalid toc-expand value

navigation
The toc-expand option has a value Quarto cannot use; the table of contents opens to the default depth.

Q-13-19 — Invalid toc-expand value

The toc-expand option has a value Quarto cannot use. The table of contents opens to the default depth of 1.

What this means

toc-expand sets how much of the table of contents is open when the page loads (see Following the reader). It accepts:

value behavior
true every entry is always open
false (or 0) nested entries open only while their section is current
a number N of 1 or more entries down to level N stay open

A number with a fractional part is rounded down: 2.5 behaves like 2. Any other value is ignored, and this warning names it. The document still renders, and the table of contents behaves as if toc-expand were not set.

Why this happens

  • A word instead of a number or boolean, such as all, none, or deep.
  • A negative depth, such as -2.

How to fix

Use true to open everything, false to keep nested entries closed, or a depth such as 2. Remove the option to get the default.