rstudio / revealjs

R Markdown Format for reveal.js Presentations
Other
325 stars 86 forks source link

Do we need to over better default behavior when TOC is too long ? #129

Open cderv opened 2 years ago

cderv commented 2 years ago

See #128 and discussion https://github.com/rstudio/revealjs/pull/128#issuecomment-926018336

So this is for now custom styling using CSS. I believe this is fine (and usually what you need to do with xaringan anyway) but maybe we can find a good default behavior that would allow to tweak the Pandoc TOC.

Or we need kind of a {{ TOC }} macro (like in HUGO) to insert manually a TOC slide maybe. (just ideas written) to not forget.

atusy commented 2 years ago

@cderv Thanks for filing the issue.

Yes, it is difficult to chose the default behavior. I used to consider adding toc option and gave up because of it. Let me share what I think.

If we use plugin, menu offers TOC as a side menu https://denehyg.github.io/reveal.js-menu/#/home

Yet, I still think TOC page can be a better choice when we print out the slide. It means, we should somehow fit the TOC into the page rathar than overflow. I think the combination of reduced font size and multi-column layout would be the solution as you suggest. However, I am not sure how to dynamically set the ideal value.

I chose scroll because that is the simplest way which at least works during presentations. In this way, we can let users modify the TOC layout by themselves when they want (maybe for printing). The problem is that R Markdown users may not be able to modify because they are not always CSS experts...