Forum How do I...?

Spacing issue between the bottom of the data column and the start of the footnote area.

In this instance there was a large space ~13 lines. On the next page the last two lines of the p tag from the previous page which is correct since our orphan and widow rules both have a value of 2. Each line had another footnote marker. When I changed the orphan and widow rules to be one the spacing issue was fixed.
One line was moved to the previous page and the large footnote moved the footnote area up so the space was used up.

Here is my question. Can Prince check for large spacing problems like this while it is processing the data and creating each page then adjust items like orphans or spacing rules that has been setup somewhere else like a config file?

Our current system can make changes like this in order to avoid large blank spaces.
You can use the boxtracking API to find out where content ends up in the formatting process:
You can then look for white space and act accordingly.
But it's probably easier to write the CSS code with white space avoidance in mind, rather than fixing it afterwards.

Edited by howcome

I have seen some white space commands and have used some. Can you point me to some that might help with this issue. I do not recall seeing any like that.

Edited by dlpBNA

There are no magical properties for avoiding white space, but setting 'widows' and 'orphans' to 1, like you did, is a good first step when debugging such issues.
I looked at the two links above around around with this a little but I am still confused on how to solve the problem. Here is the html file with all the styles. If you run it as is you should see the problem on the fifth page. Then you could do what I did and and change the orphan and widow values from 2 to 1 and run it again. The fifth page should look okay. You can search from orphan to make the file.

So how do I automate this. I was able to setup multi-pass and change the color of the text using the code in the documentation. But I do not want to make the change all the time.

1. When Prince goes from a page or column I think I would need to check how much free space is at the bottom of that page or column and if it is more then I want have it make another pass and change the orphan and widow setting. But I cannot find anything in your documentation or on the internet that shows me how to do this or even makes me believe it is possible.

I played around with box tracking, once again using the code on your web site, but I could not figure out how to get anything out of all of that and use it to help.

  1. open_space.PNG212.6 kB
  2. ps2k_tmus-por_744-3rd_a_iii.html396.7 kB

Edited by dlpBNA

From what I can see, it's only a matter of luck that changing 'widows' to 1 is enough to avoid the gap: if the following footnote occurred on the same line instead of on the next line, then there'd still need to be a big gap in order to satisfy the 'keep-with-line' request for that second footnote (given that the first footnote is very big, and we aren't allowed to place the second footnote before the end of the first footnote).

So there's a question of how you'd want to resolve that situation. The easiest solution is to drop the keep-with-line request from the style sheet altogether.

If instead you want to say "keep-with-line if it can be done with a gap of up to k lines, but if the gap is bigger than that then allow the footnote to be on the next page", then that's where the box-tracking API would come in: you would look for gaps bigger than k, and drop the keep-with-line constraint just for that paragraph.
You are somewhat correct about changing the widows values, but based on what I saw that was the first thing I thought to try.

Our current system left the two lines on the next page and did not change the footnotes. It added more padding/spacing or whatever around everything in that column making it use up most of the space. If you really look you can see that but the average reader may not notice or care if they did.

I like you suggestion about changing the rule based on the gap meeting some k line value.

I played around with multi-pass and box-tracking but nothing really popped out on how to make this work.

Still new to this and might need more documentation on how to make this work. I was able to use the examples on the web site to see how multi-pass and box-tracking work but not sure how to fix this problem using those tools.

Edited by dlpBNA

It happens that we've recently looked into allowing adding some spacing around things to help with pagination difficulties. There are some details still to be worked out, and it might not exactly correspond to how your current system operates, but it should still help.
Can you point me to the documentation about getting the "k lines" that were mentioned above?