How can I create a top level table of contents listing chapters, and sub- table of contents for sections in each chapter? #7026
Unanswered
daviewales
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I'm guessing this might require a pandoc filter? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I have a default Quarto book, created using 'new project > quarto book' in R Studio.
I want to include high level table of contents on the first page, listing each chapter.
Then, at the start of each chapter, I want a sub-table of contents, listing all the sections within that chapter.
I want this to appear in the Word docx output.
Is this possible in Quarto?
I have tried inserting
toc: true
at the start of each chapter file, but I only see a single TOC at the start of the document.I have attached my test project:
test-quarto-book.zip
EDIT:
I can get close to what I'm looking for if I render the chapters individually. For example:
Note that I have to temporarily remove the
_quarto.yml
file to make this work. Otherwise it renders the whole book. Is this intended?My goal is to render the first page based on the chapters, similar to how the book's current first page is rendered, with:
Then render each chapter similar to how they would be rendered stand-alone with:
Then concatenate all of these into a single word docx document. (PDF would be good too.)
Beta Was this translation helpful? Give feedback.
All reactions