2

I would like to use code folding in bookdown::bs4_book.

I have tried Sébastien Rochette solution and using the hide_code.html from the rtemps package which both produce similar results.

The code folding buttons show up and work to expand the code chunk but only for a second, then it collapses and disappears again.

I think the issue is that both of these option are written for bootstraps 3 and are not compatible with bs4_book? But I don't know javascript so I don't know how to fix it to get it to work.

1
  • Have the same exact issue, mine also unfold as soon as I click on them. Commented Feb 12, 2024 at 18:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.