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

Knitr hook for collapsible content ? #16

Open
cderv opened this issue Oct 17, 2018 · 1 comment
Open

Knitr hook for collapsible content ? #16

cderv opened this issue Oct 17, 2018 · 1 comment

Comments

@cderv
Copy link

cderv commented Oct 17, 2018

Would it be possible to create a knitr hook to make some custom block collapsible ?
Something like custom blocks in unilur. What do you think ?

I am not so advanced in hooks but it seems possible to me. It would need some custom html and/or js dependency but nothing infeasible. It looks like something close to how kableExtra add to be functionnal in bookdown. Unilur does not export the mechanism, but it seems possible to recreate this specific feature.

What do you think ? Am I in the wrong believing it is somehow possible ?

I'll continue to try when I have some time but I really appreciate some external thought on that.

@nathaneastwood
Copy link
Owner

I was actually looking at something similar recently. I wanted to keep the collapsible code chunks like you have in an R notebook but use the in bookdown and I came across this. Granted it doesn't utilize a knitr hook either, but it's quite neat. I'm out of the country for a while so I won't get to look at this properly for a week or so.

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