Open ignacio82 opened 5 years ago
Sorry, but no. The main goal of pagedown is for printing. You cannot fold code on paper, so it is unlikely that we will support code-folding in pagedown.
I agree: the goal of pagedown is to paginate a document using web technologies. The main difference with a html document is that pages have a limited available height (a web page has no vertical constraint).
pagedown::html_paged()
uses Paged.js as a rendering engine. Once rendered, we cannot change the content height without breaking the document.
The main problem is that the current implementation of code_folding
in rmarkdown::html_document()
modifies the content height.
With respect to this constraint on the content height, it is possible to add some interactivity to a paged html document: the reader could interact with the content before printing it. The main risk is that the printed content differs from one user to the other depending on the actions performed on the paged html document (this might lead to a reproducibility issue). However, I recognize that interacting with a paged document before printing it can be really fun and creative.
Is there any plan to add a
code_folding
option topagedown::html_paged:
? I tried the following but it did not work as expected: