-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option for page breaks while printing #1190
Comments
As a temporary workaround I've added: h1 {
page-break-before: always;
} to |
Is there a way to revert this? For a "book" with small chapters it's better to print on the same page. I looked at the theme files, but the only mention of |
Sure, I think that can be added. I'm a bit surprised that is something that would be desired, but if you'd like, you can post a PR that reverts 0eb23ef to add the option back in. |
My use case is using mdbook as lazy way to have a personal webpage and a CV in one 🙂 |
Closing as I believe this is resolved by #1728. |
What is Happening
When printing, multiple chapters can print on one page. This makes it a little difficult to find the beginning of new chapters as in some cases, the chapter may start at the bottom of a page.
no_breaks.pdf
What is Expected
As in real printed books, when a book is printed, the start of a new chapter means the start of a new page.
breaks.pdf
Proposed Resolution
The code
<p style="page-break-before: always"/>
can be added to the end of every chapter while on theprint.html
page in order to allow for the next chapter to be printed on a new page.I realize this may not be ideal for all cases, so I also propose an option like
[page-break-between-chapters] = true
be available in thebook.toml
The text was updated successfully, but these errors were encountered: