Problem

Solution pdf not as espected.

Headings partially alone at the end of the page while the whole content was on the next page.

Or one word of a section alone at the beginning ot the next page.
This is not looking nice.





So here is a little example




So just look yourself






Problems are caused by the use of orphans and widows in mediawiki stylesheet in combination with an extra stylesheet in css.



Without orphans and widows the correct output pdf is produced with both stylesheets.

Here a second heading

Lets look what happen

So in the following the problem can be clearly seen between the two pdfs.

Just another heading

This text starts always at the beginning of the new page but once with heading on the same page and once with the heading as last line of the page before. As this not looks very appealing for a document the search for the reason started.