quarto-dev / quarto-dev/quarto-cli

table of contents (TOC) included in TOC in docx book

Open
#10,692 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

books bug docx
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When rendering a book in docx, Quarto by default includes the Table of contents (TOC) in the TOC. I think this is unusual and undesired in most book projects and would suggest that reference to the TOC should by default be excluded from the TOC. Since it's possible to delist and denumber a chapter heading, this should be possible with respect to the TOC as well?

Steps to reproduce

in the book project's _quarto.yml set the following:

project:
  type: book

format:
  docx:
    number-sections: true
    toc: true
Expected behavior

The TOC itself should not be referenced in the TOC.

Actual behavior

image

Your environment

R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22631)
Quarto: ‘1.3.296’

Quarto check output

‘1.3.296’

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the book project's _quarto.yml configuration and inspect the generated DOCX table of contents. Trace the DOCX book rendering path to where the TOC entry is added; done means the TOC itself is no longer listed while other book entries remain present.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.