Closed hansvancalster closed 5 years ago
Here is another example where the subsection title alone is at the bottom of the page:
---
title: "Titel van het rapport"
site: bookdown::bookdown_site
output:
bookdown::pdf_book:
base_format: INBOmd::inbo_rapport
---
# Section
```{r results="asis", echo=FALSE}
cat(rep("a sentence", 26), sep = "\n", fill = 10)
cat(rep("a sentence", 26), sep = "\n")
This is hard to solve because you want to keep three items together. In your first example you want the section and the list to keep together. In the second example the section and the last paragraph should be together.
A workaround is to add a \needspace{measurement}
, e.g. \needspace{30mm}
. This will calculate the remaning space on the page. If there is not enough vertical space, it will insert a pagebreak.
That's a nice solution. @florisvdh pinging to you to make sure you read this. Closing the issue.
Subsection
Here are some points to consider: