Can the TOC be integrated in the sidebar contents? #5859
-
DescriptionI am preparing a book project for a course. Quarto is awesome for this! The default HTML layout shows the list of chapters in the sidebar (left) and a TOC "On this page" relative to the present page in the margin (right). Is there an option to have the TOC integrated within the sidebar? I mean that the relevant chapter entry in the sidebar would expand, showing all TOC sections. Here is a sort of visual explanation: I have managed to move the TOC to the sidebar with the option I searched for other questions on this and found this one to be somewhat related, but it isn't the same. Just to justify this question: I personally find it logically neater if the left sidebar is dedicated to navigation- and site-related items, and the right margin only shows additional information related to the main, central text, such as margin notes, small plots, references, and similar. I'm really grateful that Quarto allows for this look out of the box! Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Currently we don't have a way to include the TOC as additional sub items in the sidebar (the sidebar is currently reserved for top level elements (e.g. pages, chapters, parts). It would be a little complicated since the TOC is really only known for a page once it is rendered and the headings are identified, but it is something we could consider for a future release... Is it your preference in terms of layout appearance or is there some other use case driving this? |
Beta Was this translation helpful? Give feedback.
-
I would also prefer such behaviours. Coming from bookdown, I was immediately searching how to get the navigation in the sidebar. |
Beta Was this translation helpful? Give feedback.
Currently we don't have a way to include the TOC as additional sub items in the sidebar (the sidebar is currently reserved for top level elements (e.g. pages, chapters, parts). It would be a little complicated since the TOC is really only known for a page once it is rendered and the headings are identified, but it is something we could consider for a future release...
Is it your preference in terms of layout appearance or is there some other use case driving this?