-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] More flexible table of contents in tufte_html_book #1434
Comments
The website code source is at https://github.com/rstudio/bookdown-demo/ The TOC on the top is just some CSS : https://github.com/rstudio/bookdown-demo/blob/main/toc.css You can probably achieve the same using similar CSS. |
Also if you don't know about it, there is a new project called Quarto that unifies and extends what has been done over the years in the R Markdown ecosystem. This tool is developed by a team close to R Markdown ecosystem too. it is not a replacement per-se but a lot of improvment has been made and design has been rethought. Especially:
Maybe it could be of interest. For R users, it is quite similar to R Markdown. |
I was looking for something more automated. I'm new to HTML so what I say might be total nonsense. Nevertheless, I can create a navigation bar at the top and use it via the I was putting off diving into Quarto but thanks to you I finally took the plunge. Thank you. :) |
We don't have such feature built-in. However, tweaking the generated TOC using CSS to make a different layout is automated, in the sense that if the TOC update, it will be updated.
If you create the navigation bar hard coding the TOC it won't update. Though you could also tweak the templates to insert the TOC where you want, but this is more complex IMO than CSS tweaks.
Good! When looking for some specific new things like you do, having a dive into Quarto can be worth it IMO, even for an R user. |
I'm using
tufte_html_book
. I would like a feature in which the table of contents be either collapsible or in a navigation bar at the top (like here).Currently the situation is that enabling the table of contents makes it appear at the top of every page of the html book, thereby wasting a lot of space.
The text was updated successfully, but these errors were encountered: