groff
[Top][All Lists]
Advanced

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

Re: Leaders


From: Peter Schaffter
Subject: Re: Leaders
Date: Sun, 3 Sep 2023 15:10:29 -0400

Branden --

On Sat, Sep 02, 2023, G. Branden Robinson wrote:
> > Question 1:
> > Is \a only interpreted in copy mode as this would suggest?
> 
> Yes.  This has been documented for a long time, but I don't think very
> clearly.

Precisely why I asked. :)

> Until (he boasted) groff 1.23.0.
> ...
>  -- Escape sequence: \a
>      Interpolate a leader in copy mode; see *note Copy Mode::.

Perfectly accurate, but given the oddity (rarity?) of an escape
sequence reserved for use in copy mode, I wonder if a little
amplification might help in addition to the "see *note".

> > Question 2:
> > What is causing the erroneous justification of the third line?
> > There's more than enough room for "air" and some leader.
> 
> There is not, in the example you provided.  You set one tab stop, at the
> line length (meaning at the right margin), so there was no hope of
> "air"+leader fitting on the line.

That's not at all how I interpret what I see in the output, which
is:

  The château into which my valet had ventured to make forcible en‐
  trance,  rather  than  permit me, in my deparately wounded condi‐
  tion,     to     pass     a      night      in      the      open
  air..................................

Since this can be rendered as

  The château into which my valet had ventured to make forcible en‐
  trance,  rather  than  permit me, in my deparately wounded condi‐
  tion, to pass a night in the open air............................|<=unique 
tab stop

i.e. there's plenty of room.  The leader character is introduced at
a point in the line where it should, according to

  "A leader character...behaves similarly to a tab character: it
   moves to the next tab stop.  The difference is that for this
   movement, the default fill character is a period '.'."

move to the tab stop at the right margin and fill the space with
leaders, no?  I can see where there might be problems in situations
similar what the docs have to say about \R, but here I don't think
that's the case.

> > Question 3:
> > Why do the leaders not respect .ta \n[.l]u?
> 
> As I understand your example, the leader respected your tab stop
> precisely; it was of the correct length to reach the configured right
> margin _relative to the horizontal drawing position corresponding to the
> start of the input line_, was formatted, was too long, could not be
> hyphenated, and so was kicked to the next line.  Leaders, like tabs, are
> not considered break points.

I'll repeat my example here for ease of discussion.

  cat <<EOF | groff -Kutf8 -k -Tutf8
  .pl 3v
  .ta \n[.l]u
  The château into which my valet had ventured to make forcible
  entrance, rather than permit me, in my deparately wounded condition,
  to pass a night in the open air^A
  EOF

As nearly as I can fathom, "the horizontal drawing position
corresponding to the start of the input line" is at the word "to",
which still leaves plenty of room for "air"+leaders (see above).
I still don't understand what's going on.

-- 
Peter Schaffter
https://www.schaffter.ca



reply via email to

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