Skip to content
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

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

Open
cderv opened this issue Sep 23, 2021 · 1 comment
Open

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

cderv opened this issue Sep 23, 2021 · 1 comment

Comments

@cderv
Copy link
Collaborator

cderv commented Sep 23, 2021

See #128 and discussion #128 (comment)

  • PR suggest to add scrollable TOC but this create a vertical scrollbar, and not sure it will be ok for printing.
  • Other solution involve for now custom CSS to
    • reduce font size
    • use CSS for column
      (see example in the discussion linked)

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
Copy link
Contributor

atusy commented Sep 24, 2021

@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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants