Skip to content
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

Add optional page-break #1570

Closed
intptr-t opened this issue Jun 7, 2021 · 1 comment
Closed

Add optional page-break #1570

intptr-t opened this issue Jun 7, 2021 · 1 comment

Comments

@intptr-t
Copy link

intptr-t commented Jun 7, 2021

Since version 0.4.8, when I have to include a long word that does not fit on a single line (specifically, a hyperlink, etc.), the h1 header of the next page is out of position in the forced page break.
(#1485)

I was working on manually adding page breaks (<div style="page-break-before:always"></div>) to some sentences.
In pdfs printed from print.html with the current version, I'm suffering from a case where the h1 header comes at the end.

Is it possible to manually opt-out the page break option?

========

For example, I printed the following book using Google Chrome

.
├── book
├── book.toml
└── src
    ├── SUMMARY.md
    ├── chapter_1.md
    └── chapter_2.md

book.toml

[book]
authors = ["UserName"]
language = "en"
multilingual = false
src = "src"

chapter_1.md

# Chapter 1

<https://www.google.com/search?q=mdbook&rlz=1C5CHFA_enJP895JP903&oq=mdbook&aqs=chrome..69i57j69i59j69i60l3.795j0j1&sourceid=chrome&ie=UTF-8>

chapter_2.md

# Chapter 2
Content2

SUMMARY.md

# Summary

- [Chapter 1](./chapter_1.md)
- [Chapter 2](./chapter_2.md)

Preview

image

Environment

% mdbook --version
mdbook v0.4.8

% sw_vers  
ProductName:    Mac OS X
ProductVersion: 10.15.7
BuildVersion:   19H1217

% /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version
Google Chrome 91.0.4472.77 
@ehuss
Copy link
Contributor

ehuss commented Jul 6, 2021

Thanks for the report! Sorry that was causing you trouble. I think this is a duplicate of #1190, so I'm going to close in favor of that. If I misunderstood, feel free to reopen. There are instructions there on how to add the option.

@ehuss ehuss closed this as completed Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants