As far as I got, by playing around, the '\c' doesn't matter. It seems
that the additional page comes from an additional call to the
default page break.
Using a custom trap, just disable it in your end trap:
----8<----
.\"
.\" run: groff em-test.groff > em-test.ps
.\"
.nr PAGE-trap 20c
.nr PAGE-ll 13c
.\"
.de my-trap
.tl '\\v'|\\n[PAGE-trap]u'\\h'|0'\\D'l \\n[PAGE-ll]u 0c''''
'bp \" matters: not .bp
..
.\"
.de your-end
\c \" doesn't matter
. ne 3v
. sp (\\n[.t]u - 3v)
.wh \n[PAGE-trap]u \" matters: disable regular trap
. in +4i
. lc _
. br
Approved:\t\a
. sp
Date:\t\t\a
..
.\"
.wh \n[PAGE-trap]u my-trap
.em your-end
.\"
.\".SF-std
.\"
XXX first line XXX
.br
.\"
.sp |(\n[PAGE-trap]u-2.99v) \" matters: 3.01v get you one page only
YYY last line YYY
.\"
----8<----
Without custom trap handling, one need to prevent the default one to
engage:
----8<----
.\"
.\" run: groff em-test.groff > em-test.ps
.\" or: groff em-test.groff > em-test.ps
.\"
.nr Pt 20c \" page trap
.nr Pl 13c \" page length
.\"
.pl \n(Ptu
.\"
.\".de mt \" my trap
.\".tl '\\v'|\\n(Ptu'\\h'|0'\\D'l \\n(Plu 0c''''
.\"'bp \" matters: not .bp
.\"..
.\"
.de ye \" your end
.\"\c \" doesn't matter
. ne 3v
. sp (\\n(.tu - 3.01v) \" prevent another page break
.\".wh \n(Ptu \" matters: disable regular trap
. in +4i
. lc _
. br
Approved:\t\a
. sp
Date:\t\t\a
..
.\"
.\".wh \n(Ptu mt
.em ye
.\"
.\".SF-std
.\"
XXX first line XXX
.br
.\"
.sp |(\n(Ptu-2.99v) \" matters: 3.01v get you one page only
YYY last line YYY
.\"
----8<----