How to code Rmarkdown to generate HTML that displays the selected item in the TOC only

32 Views Asked by At

I can code in Rmarkdown so that it generates an HTML file with TOC (one .Rmd file for each chapter). Nevertheless, I would prefer that only the selected item in the TOC be displayed, as it happens in eg https://bookdown.org/yihui/rmarkdown-cookbook/
Currently, what I get is the entire HTML displayed, and selecting in the TOC "focus" the display on that section, but it is possible to scroll up and down to other sections.

0

There are 0 best solutions below