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

Pagebreak beneath and section heading #207

Open
TomK32 opened this issue Nov 27, 2024 · 1 comment
Open

Pagebreak beneath and section heading #207

TomK32 opened this issue Nov 27, 2024 · 1 comment

Comments

@TomK32
Copy link

TomK32 commented Nov 27, 2024

No idea wether this is mdpdf's doing or some other library used by mdpdf, but I stumbled across a page break right after the ## markdown section heading. This is a real document, luck would have it breaks at the markdown section.

image

First thing I tried is to apply a simple style:

h1, h2, h3, h4, h5, h6 {
  page-break-after: avoid;
}

Which worked as intended but of course now I have to copy over mdpdf's default.css and github-markdown-css.css to make the thing look pretty again.
Is there any chance of either adding the CSS that I provided above or adding a cmdline option like --append-style which just adds my css file rather than using it just exclusively.

@TomK32
Copy link
Author

TomK32 commented Nov 27, 2024

Also, mdpdf won't accept multiple --style arguments. meow does have the isMultiple flag though for such cases.

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

1 participant