sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
23 stars 8 forks source link

v1.9.3 odd empty line at bottom of page #489

Closed davidc86 closed 3 years ago

davidc86 commented 3 years ago

This might be niggly, but I don't see any reason for this odd blank line on the right-hand page. The two pages are lined up nicely, but the right-hand page pushes the last line onto the next page for no apparent reason. (The last line has no footnotes and no cross-references, and is only a few words long.)

image

markpenny commented 3 years ago

Could you show us a screen-shot of the TOP of the next page, please. Or send us an archive.

mhosken commented 3 years ago

My guesstimate with just the information we have is that there isn't actually room for another line above the footnote. I'm not sure why, but the very bottom of that second page looks higher than the first and the footnote line is higher too, which is odd in itself. But I do echo Mark's request. We really aren't psychics. We can't just look at something odd and tell you why it's gone wrong from even a full pdf. Very occasionally we strike lucky. But this is not the way to raise an issue, to rely on wild guessing.

You may feel fed up that we keep asking for an archive of the same project. But each time the configuration is different and that is what we are after. Please do trim the configuration down to the fewest books necessary to show the problem before creating the archive.

davidc86 commented 3 years ago

Here is the next page:

image

NOTE: there is no footnote or cross-reference associated with that last bit of text at the top. I've set my PTXprint configuration to allow single lines to sit by themselves, so that isn't a problem. But it just looks like that last line should fit on the previous page when compared to the previous page. (Unless the chapter number somehow bumps something?)

I can send an archive too.

davidc86 commented 3 years ago

SLU-SelaruNewPublicationPTXprintArchive1COR.zip

markpenny commented 3 years ago

This might be niggly, but I don't see any reason for this odd blank line on the right-hand page. The two pages are lined up nicely, but the right-hand page pushes the last line onto the next page for no apparent reason. (The last line has no footnotes and no cross-references, and is only a few words long.)

image

My analysis (best guess) is that the bottom of the right-hand side is very slightly higher because there is a descender in the footnote. If you turn on grids and compare a footnote with and without a descender (for example in the letter j or p) it will be ever so slightly different - but enough to say "there's not enough space for that final line of text".

My preference for fixing this would be to assume that all notes have a descender on the final line and to calculate the note box height accordingly.

davidc86 commented 3 years ago

Wow, good catch! I agree with you Mark, that the footnote "box" should assume descenders so the space allotted is consistent regardless of whether the text happens to have descenders in it or not.

markpenny commented 3 years ago

Here is what is happening: Due to the left notes having a descender, the entire "notebox" sits slightly higher, so the last line of the main body text ends up unusable (insufficient vertical space). image

I would prefer that all "noteboxes" sit that little bit off the bottom edge so that the footnotes don't change position vertically depending on whether they have a descender or not. If this is too hard to code in TeX, then could we insert an (invisible) character [maybe a space character???] that descends below the baseline so that it always has that space regardless of whether it is needed?

mhosken commented 3 years ago

Do you have advanced/use glyph metrics turned off? Because that might fix this (but in the opposite direction to what you might expect)

On Fri, 10 Sep 2021, 07:21 Mark Penny, @.***> wrote:

Here is what is happening: Due to the left notes having a descender, the entire "notebox" sits slightly higher, so the last line of the main body text ends up unusable (insufficient vertical space). [image: image] https://user-images.githubusercontent.com/12962708/132778897-f3969177-2921-4df2-9337-f83fa8d0a65f.png

I would prefer that all "noteboxes" sit that little bit off the bottom edge so that the footnotes don't change position vertically depending on whether they have a descender or not. If this is too hard to code in TeX, then could we insert an (invisible) character [maybe a space character???] that descends below the baseline so that it always has that space regardless of whether it is needed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sillsdev/ptx2pdf/issues/489#issuecomment-916530908, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLMO3OE45IVC5NEAF5PALTUBFFRTANCNFSM5DES26FA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mhosken commented 3 years ago

As Mark has shown, one way to help to see what is going on is to turn on gridlines. This often helps to see exactly what lines up with what. And just to reiterate my previous comment: Try turning 'use glyph metrics' off in the advanced tab.