Jeremias Maerki wrote:
It's an interesting idea. However, I suspect this will probably not be necessary. We should be able to make the breaker clever enough to handle this particular case.
When the page bpd depends on the page-masters, things becomes very strange. Not only it's difficult to implement the page-master choice, but even to understand what should be the expected result! :-)
For example: let's suppose the breaker is working, and it has to place the last 25 lines of a page-sequence. The page-master for the last page has a bpd allowing no more than 20 lines, while the other page-masters can contain up to 30 lines.
What happens? If the breaker starts building a "last page" it soon realizes that it would not contain all the remaining content, so it would be no more a "last page". But if it starts building a "non-last page", it reaches the end of the content, and has to turn it into a "last page", which is impossible.
What is the expected output? The only way I see to satisfy the property is to create two more pages: one "non-last" page, partially empty, with less than 25 lines (24 or fewer, if there are keeps, widows or orphans) and a last page with the remaining lines.
This sort of problems happens only if the last page is smaller than the previous ones: otherwise, the breaker can always try to build a non-last page, eventually moving all its content into a last page.
Now I think of this ... an idea, that could work at least when the non-last pages have the same bpd and the last page a smaller one, could be to modify a little the elements appended at the end of the sequence, so that they have a width equal to the difference (nonLastBPD - lastBPD). This way, the last page created by the breaker will have an apparent width of nonLastBPD, but the content placed inside it will have an overall bpd equal to
nonLastBPD - (nonLastBPD - lastBPD) = lastBPD What do you think? Regards Luca