groff
[Top][All Lists]
Advanced

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

Re: Differences in `ne` and `bp` line-breaking behavior


From: G. Branden Robinson
Subject: Re: Differences in `ne` and `bp` line-breaking behavior
Date: Mon, 2 Dec 2024 20:01:30 -0600

Hi Tadziu,

At 2024-12-03T00:22:40+0100, Tadziu Hoffmann wrote:
> >        .ne       Advance drawing position to the next vertical position
> >                  trap if it is nearer than one vee.
> >        .ne d     Advance drawing position to the next vertical position
> >                  trap if it is nearer than distance d (default scaling
> >                  unit v).
> > 
> > How do people feel about that wording?
> 
> Perhaps you could additionally point out that this advancing
> of the drawing position then springs the trap in question.
> I think this is a core feature of .ne.

Later in the same page we have this:

--snip--
Traps
       Traps are locations in the output, or conditions on the input that,  when
       reached  or  fulfilled, call a specified macro.  A vertical position trap
       calls a macro when the formatter’s vertical drawing position  reaches  or
       passes,  in the downward direction, a certain location on the output page
       or in a diversion.  Its applications include  setting  page  headers  and
       footers,  body  text in multiple columns, and footnotes.  These traps can
       occur at a given location on the page (.wh, .ch); at a given location  in
       the  current  diversion (.dt)—together, these are known as vertical posi‐
       tion traps, which can be disabled and reënabled (.vpt).  Setting  a  trap
       is  also  called  planting  one.  It is said that a trap is sprung if its
       condition is fulfilled.

       A diversion is not formatted in the context of a page, so it  lacks  page
       location traps; instead it can have a diversion trap.  There can exist at
       most one such vertical position trap per diversion.

       Other kinds of trap can be planted at a blank line (.blm); at a line with
       leading space characters (.lsm); after a certain number of productive in‐
       put  lines  (.it,  .itc); or at the end of input (.em).  Macros called by
       traps are passed no arguments.

       Registers associated with trap management include vertical position  trap
       enablement status (\n[.vpt]), distance to the next trap (\n[.t]), and the
       name  of that trap (\n[.trap]); the count of lines remaining in the pend‐
       ing input trap (\n[.it]), the  name  of  the  macro  associated  with  it
       (\n[.itm]), and whether that input trap honors the \c output line contin‐
       uation escape sequence (\n[.itc]); amount of needed (.ne‐requested) space
       that  caused  the  most  recent  vertical  position  trap  to  be  sprung
       (\n[.ne]), amount of needed space truncated  from  the  amount  requested
       (\n[.trunc]);  page  ejection  status  (\n[.pe]); and leading space count
       (\n[lsn]) with its corresponding amount of motion (\n[lss]).
---end snip---

Does that cover the base in question?  The request synopses are supposed
to be really terse, following the CSTR #54 model and serve as a
refresher for the experienced.  The basic fact that moving the drawing
position to (or past) a vertical position trap springs it is, I think,
covered in the narrative above.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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