[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #50770] .PSPIC macro at bottom of page causes unwarranted page brea
From: |
Dave |
Subject: |
[bug #50770] .PSPIC macro at bottom of page causes unwarranted page break |
Date: |
Sun, 28 Jul 2024 23:09:09 -0400 (EDT) |
Follow-up Comment #11, bug #50770 (group groff):
[comment #2 comment #2:]
> Is this because line 90 of pspic.tmac "needs" the height of the
> graphic PLUS 1v whilst the vertical movement after the graphic
> is output is only the height of the graphic, so it is needing
> more vertical space than it uses for the graphic.
I delved further into this. The line in the .PSPIC macro (in
[http://git.savannah.gnu.org/cgit/groff.git/tree/tmac/pspic.tmac
tmac/pspic.tmac]) to which Deri refers is:
. ne (\\n[ps-desht]u + 1v)
I infer "ps-desht" is "desired height of the PostScript image", so this line
is, as Deri said, "ne"eding vertical space equal to the image's scaled height
plus 1v. This is the only .ne request in .PSPIC.
This line is effectively unchanged (only parentheses and whitespace being
added later) from the beginning of our git history, when the .PSPIC macro
lived in ps/tmac.ps.
[http://git.savannah.gnu.org/cgit/groff.git/tree/ps/tmac.ps?id=351da0dcdf702cf243d26ffa998961bce2aa8653#n90
That primordial .PSPIC macro] did not do a break (explicit or implicit) before
the .ne, which could explain the "+1v": it would account for a (potential)
partially collected line.
But that situation didn't last long: less than a year later, in
[http://git.savannah.gnu.org/cgit/groff.git/commit/?id=a48ab7b6d commit
a48ab7b6d], James Clark moved the .PSPIC macro out of ps/tmac.ps and into its
own file, then named ps/tmac.pspic. One of the changes accompanying this move
was the addition of a .br request at the very top of .PSPIC.
Nonetheless, that "+1v" stayed in the .ne line. Is it still necessary, with
the explicit break before it? Did James Clark leave it there for a reason, or
was it an oversight? What are situations where you should "ne"ed more space
than the height of the scaled image?
> This ensures there is room for at least one line after the graphic.
It does--but it shouldn't. An image should be allowed to be at the bottom of
the page.
If the image requires a caption (as comment #4 suggests), the user must be
responsible for ensuring the caption remains with the image. .PSPIC does not
know about any caption requirements, so should not presume there will be one,
and that it will be exactly one line.
But ultimately I don't think space for a caption is the rationale for the
"+1v"; I think it's an artifact of a missing break in the original .PSPIC
implementation.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?50770>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break,
Dave <=