You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in our project documentation, we have often the case that a chapter has no content. For example if it is directly followed by a sub chapter or if the content is added at a later time. This results in a lot of nearly empty pages in the rendered PDF document.
As far as I have seen, there is no possibility to prevent sphinx-simplepdf from making page breaks in general, or to configure the level of chapters for which a page break should be done (eg only for the main chapters).
Maybe anyone has already a solution for this issue?
If there is no option for that at the moment, it would be really helpful, to introduce such a configuration option.
Thanks in advance for your feedback and support.
The text was updated successfully, but these errors were encountered:
This could be configured via the css. In the main.css by default a page break is added before h1, h2 elements.
E.g. you can disable it for h2 elements. I see currently no possibility to make it "content" dependent.
You can also add classes and directives to force page breaks for e.g. specific (class) h2 elements etc.
My solution to have no page break between first (and only h1 chapter) and the "content" h2 chapters e.g. is:
/* no page break after first title */
h1 + section > h2 {
page-break-before: avoid;
}
Hello,
in our project documentation, we have often the case that a chapter has no content. For example if it is directly followed by a sub chapter or if the content is added at a later time. This results in a lot of nearly empty pages in the rendered PDF document.
As far as I have seen, there is no possibility to prevent sphinx-simplepdf from making page breaks in general, or to configure the level of chapters for which a page break should be done (eg only for the main chapters).
Maybe anyone has already a solution for this issue?
If there is no option for that at the moment, it would be really helpful, to introduce such a configuration option.
Thanks in advance for your feedback and support.
The text was updated successfully, but these errors were encountered: