Closed paulcbauer closed 3 years ago
I'm so glad to learn you are a fan of pagedown! These performance issues are mainly related to Paged.js.
Some performance improvements have been made recently by the Paged.js dev team. I haven't found time yet to update Paged.js in pagedown (I know I'll have to maintain the chrome_print()
function for instance because the latest version of Paged.js breaks it).
If you want to play with the latest version of Paged.js in pagedown in order to explore whether it improves your workflow, there is a hidden and undocumented .test
parameter in html_paged()
.
I also know some issues in Paged.js related to performance issues (see here and here for instance).
The main challenges with chapters splitting are about page numbering and cross-references (this is really a hard challenge). I don't know whether this is a major constraint in your book.
I just tried the .test parameter (.test: TRUE in the header) but then my chrome browser does not properly display the book. Using the current pagedjs it looks great but seems slow. But I remember compiling it with bookdown without the 'split_by' option, and it was too slow back then as well. So maybe our manuscript is simply to heavy (many graphs etc.), which somehow forces us to use the bookdown/splitting approach (we need cross-references etc.).
For now we'll simply write our first chapter in pagedown (we can always easily switch to bookdown). So in case you ever think about adding the split feature please let us know. Other than that I am using pagedown for letters and want to start using it for research papers.. who knows maybe the days of latex are numbered [a painful thought given how many hours/days I spent on debugging latex scripts ;-)].
This is very interesting! I've omitted to explain that .test: true
cannot be used with self_contained: true
(its purpose is also to perform some tests locally).
With the current Paged.js, there is an infinite loop because of Table 5.1 (Summary statistics): Paged.js breaks it. There is still some improvement to do in pagedown for tables support (see #162).
Ok, thanks for letting me know (my html, css knowledge is basic and has not really been updated since my teens)!
In the long-run it would be cool to have one single book manuscript (or chapters) that includes the slides for teaching. While teaching (using a beamer) one would zoom in and simply jump from slide to slide in the book. But at the same time students could use that same script as their textbook.
In this example I played around with pagedown and some javascript code I found online that generates links between my slide divs. So jumping from slide to slide works. However, for that to be really useable in class one would also need a TOC that is always present on the side for navigation (no idea how to get that)... anyways just so you know what I am up to.
I think these performance issues are now solved. I had myself produced a 300+ pages PDF with a satisfying rendering time.
We have no plan to split by chapters. IMO, a better strategy is to add a print button on each HTML chapter which can dynamically paginate the content with Paged.js. For a living example, see https://www.book.utilitr.org/ (in :fr:).
I am already a big fan of pagedown. We are currently experimenting with moving from bookdown to pagedown for a book we are writing.
However, I am running into performance issues (the book shall have ~300 pages). I was playing around with a file of ~170 pages (the standalone pagedown html ~14 MB) that I uploaded to the bookdown server.
Are you planning a feature that would make it possible to distribute chapters across different html pages? Analogue to the 'split_by: section' argument in bookdown?