[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #50770] .PSPIC macro at bottom of page causes unwarranted page
From: |
Steffen Nurpmeso |
Subject: |
Re: [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break |
Date: |
Thu, 04 May 2017 22:21:18 +0200 |
User-agent: |
s-nail v14.9.0-pre4-37-gf921ae51 |
Ok, i am no wizard, but
Deri James <address@hidden> wrote:
|Follow-up Comment #8, bug #50770 (project groff):
|
|> Sorry if I was unclear. I am referring to the case where an image fits at
|> the bottom of a page, but PSPIC insists on moving it to the next page
|> anyway, because +1v. This move only results in an empty space that could
|> have been filled with something useful.
|
|Yes, so the maximum amount of usable space which is lost, is 1v. So for a
|large graphic the percentage lost is small.
|
|> I'm no macro wizard, but surely there is a way for PSPIC to supply \
|> vertical
|> space below the image if text continues there, while still allowing the
|> image to sit at the bottom of a page.
|
|I have not earned my wizarding wand either, but I do know that groff is a
|single pass system, so you don't know what is following. You do know the
|position on the page where the next output will occur but this does not help
|if PSPIC was called within a diversion which is subsequently then output \
|at a
|later point.
|
|We need a wizard!
How about adding a new argument -N which does not add anything,
then it is up to the user to decide what to do. Something like
below.
TODO: no idea of HTML yet, and i think the height and width
arguments should be passable without units, this yet seems to
fail.
diff --git a/tmac/pspic.tmac b/tmac/pspic.tmac
index 8a8cdd2c..c3fbc7f6 100644
--- a/tmac/pspic.tmac
+++ b/tmac/pspic.tmac
@@ -9,7 +9,7 @@
.\"
.\" Usage:
.\"
-.\" .PSPIC [-L|-R|-C|-I <indent>] <file> [<width> [<height>]]
+.\" .PSPIC [-L|-R|-C|-I <indent>] [-N] <file> [<width> [<height>]]
.
.do if d PSPIC .nx
.
@@ -47,6 +47,12 @@
. \}
. \}
. \}
+. \" No vertical space
+. ie '\\$1'-N' \{\
+. nr ps-vspace 0v
+. shift
+. \}
+. el .nr ps-vspace 1v
.
. br
.
@@ -87,7 +93,7 @@
. \}
.
. \" reserve vertical space for image
-. ne (\\n[ps-desht]u + 1v)
+. ne (\\n[ps-desht]u + \\n[ps-vspace]u)
.
. \" compute image offset w.r.t. the current left margin
. if (\\n[ps-offset-mode] == 0) \
--steffen
|
|Ralph says i must not use signatures which spread the light!
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, G. Branden Robinson, 2017/05/01
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Deri James, 2017/05/01
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, G. Branden Robinson, 2017/05/03
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, G. Branden Robinson, 2017/05/03
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Deri James, 2017/05/03
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Dave, 2017/05/03
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Deri James, 2017/05/03
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Dave, 2017/05/04
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Deri James, 2017/05/04
- Re: [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break,
Steffen Nurpmeso <=
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Dave, 2017/05/04
- [bug #50770] .PSPIC macro at bottom of page causes unwarranted page break, Deri James, 2017/05/05