groff
[Top][All Lists]
Advanced

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

Re: Leaders


From: Lennart Jablonka
Subject: Re: Leaders
Date: Sat, 2 Sep 2023 22:35:25 +0000

Quoth G. Branden Robinson:
On second thought--in the form of empirical measurements rather than
hand-waving conjecture--I think you've found a bug.

How so?

Consider the following input, which I've degraded to an ASCII spelling
of "chateau" to permit some comparative analysis (keep reading).

$ cat long-leader.roff
.ta \n(.lu
.nf

a
air
.fi
The chateau into which my valet had ventured to make forcible
entrance, rather than permit me, in my desparately wounded
.sp
entrance, rather than permit me, in my desparately wounded

There are some hidden Control+A (leader) characters in the above.  Let's
expose them.

No, there aren’t. Your message does not contain the SOH bytes; you could as well put replacement “^A”s there.

Now the output.

$ nroff EXPERIMENTS/long-leader.roff | cat -s
.................................................................
a................................................................
air..............................................................
The chateau into which my valet had ventured to make forcible en‐
trance, rather than permit me, in my desparately wounded......

entrance, rather than permit me, in my desparately wounded.......

This mostly looks great, except, uhh, the line after the hyphenated
"entrance".  What gives?

You got what you asked for: a field of periods with length such that the strings “entrance, rather […] wounded $periods” exactly fits from the start of the line to the tab stop.

If instead you do

        .ta \n(.lu
        .fi
        .nh
        The chateau into which my valet had ventured to make forcible
        entrance, rather than permit me, in my
        desparately wounded^A

(with C-a replaced by ^A (heh))

you get

        The  chateau  into  which  my valet had ventured to make forcible
        entrance,   rather   than   permit   me,   in   my    desparately
        wounded..............................................

without any hyphenation going on. The point is that the width of the line of periods is determined by its position on the input line. That is confusing, yet it also doesn’t usually matter: You seldom use tabs or leaders in filled text.



reply via email to

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