groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposed GNU troff behavior change: require end-of-input macros to e


From: Deri
Subject: Re: Proposed GNU troff behavior change: require end-of-input macros to exit
Date: Sun, 17 Dec 2023 21:13:27 +0000

On Sunday, 17 December 2023 20:53:52 GMT G. Branden Robinson wrote:
> Hi Deri,
> 
> At 2023-12-10T18:43:42+0000, Deri wrote:
> > On Saturday, 9 December 2023 19:25:27 GMT G. Branden Robinson wrote:
> > > When a line of output is "finished" and sent to the device
> > > (device-independent output is prepared for it), the vertical
> > > position advances by one vee, and, (in groff, if vertical position
> > > traps are not disabled,) any visible vertical position traps planted
> > > between the previous text baseline and the new one are sprung.[1]
> > > If one of these traps is what I term "the implicit page trap"[2],
> > > then the page is ejected and a new one started.
> > 
> > Is this the problem? It does not make sense to start a new page until
> > groff "knows" there will be further output.
> 
> Changing that is a deeper, more intrusive change than I am proposing.
> It would affect approximately all page transitions processed by the
> formatter.
> 
> Not saying that it's wrong or a bad idea, but it's significantly more
> ambitious than what I proposed.
> 
> > So if the implicit page trap is triggered it should set a flag to
> > trigger the new page code if further output, other than "x trailer",
> > is output. This is an example of troff output:-
> > 
> > x T pdf
> > x res 72000 1 1
> > x init
> > p1
> > x font 5 TR
> > f5
> > s10000
> > V12000
> > H72000
> > mr 0 0 0
> > DFd
> > tline
> > n12000 0
> > V792000
> > H72000
> > tline
> > n12000 0
> > V792000
> > p2
> > x trailer
> > V792000
> > x stop
> > 
> > The V792000 and p2 are unnecessary unless there is further output.
> 
> That's true, but my hunch is that most *roff users over the years to
> want to write within 1v of the page bottom use "local" vertical motions
> from a safe distance to do so.
> 
> Hmmm, I was going to show you an exhibit involving `\V` but managed to
> surprise myself.
> 
> Here's a counterexample.
> 
> $ cat ATTIC/kiss-foot.tr
> .\" U.S. letter paper assumed
> .sp 65v
> Hello!
> 
> This produces a ONE page PostScript document with "Hello!"'s text
> baseline sitting at the very boundary of the paper.  And there is no
> blank second page.  I had predicted one, so obviously there is more for
> me to understand here.  (And another trip back to groff.texi with my
> text editor after that.)
> 
> Obviously when the formatter performed a break and pushed the output
> line, it recognized that there was no more input, and didn't break the
> page as well.
> 
> Here's the grout:
> 
> $ groff -Z ATTIC/kiss-foot.tr
> x T ps
> x res 72000 1 1
> x init
> p1
> x font 5 TR
> f5
> s10000
> V792000
> H72000
> md
> DFd
> tHello!
> n12000 0
> x trailer
> V792000
> x stop
> 
> (It even _SAYS_ there's a break after the text, with the 'n12000 0'
> documentary command.)
> 
> I challenge you to explain!  :D
> 
> Regards,
> Branden

Add .fl after Hello. :-)

Cheers

Deri





reply via email to

[Prev in Thread] Current Thread [Next in Thread]