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

Section's page split control #125

Open
michalfita opened this issue Nov 13, 2024 · 3 comments
Open

Section's page split control #125

michalfita opened this issue Nov 13, 2024 · 3 comments

Comments

@michalfita
Copy link

Generated epub book splits page at each section, not only first level (desired for chapters). This is not natural, it would be desired there's some control over the level of nested section which start a new page and which don't.

Typical books start each chapter on a new page (quite often odd, but that doesn't matter much in e-book), then sections are visual indication withing flow on the page.

The other part is all sections are centered, what again is not always desired, but as that may be CSS specific it's part of a different problem.

@blandger
Copy link
Collaborator

blandger commented Jan 5, 2025

I'm not sure what do you want to propose. mdbook-epub follows EPUB specification in general.
If you want something beyond it, that probably needs specification changes.
Or... I didn't get your question, sorry.

@michalfita
Copy link
Author

I cracked that and the problem lies in... your default CSS that's not part of the specification. The default has page separation enforced for h2 by page-break-before: always;. I changed that to fix this, but it's non-trivial fix to find.

Suggestion here is either better documentation of control of that via kind of configuration option.

@blandger
Copy link
Collaborator

blandger commented Jan 7, 2025

The default has page separation enforced for h2 by page-break-before: always;. I changed that to fix this, but it's non-trivial fix to find.

Good. You can propose such fix if you want. Also it's possible to add additional css into your own book, so it will be added to epub.

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