[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Odd adjusting behavior
From: |
Deri James |
Subject: |
Re: [Groff] Odd adjusting behavior |
Date: |
Sat, 3 Jul 2010 02:11:13 +0100 |
User-agent: |
KMail/1.13.2 (Linux/2.6.31.13-desktop-1mnb; KDE/4.4.2; x86_64; ; ) |
On Saturday 03 July 2010 00:31:20 brian m. carlson wrote:
> I'm working on autogenerating some troff input for a project of mine,
> but I found some very odd behavior with the ad request. My testcase is
> attached. If you run groff with -rTC=1, my name is properly centered
> and in italics (as desired). However, if you do not, my name is left
> adjusted.
>
I believe groff does not "action" the .ad request until it is about to output
the line (makes sense since it needs to know total width of text before
centreing).
I can think of 3 circumstances when groff can output a line:-
a) while adding words to the output line and the current line length is
exceeded.
b) a specific .br or .fl is executed.
c) another command is executed which implies a break (EXCEPT when introduced
by apostrophe instead of period)
As all the commands after "brian m. carlson" are introduced with apostrophes
no breaks occur until the final .br (at which time .ad b is in effect rather
than the earlier .ad c).
If you replace all the apostrophes with periods all works as you desire
because the .ft R causes an implied break (at which point .ad c is in
effect).
> It seems a little odd to me that a break *after* the text, but *before*
> another change of adjustment is required to make this work. Is this
> behavior intentional?
Normally .ad implies a break (so line would be flushed out with previous
justification before switching to new justification for following text), but
using 'ad suppresses the implied break so becomes the new justification for
the current line when it eventually gets flushed out and justification is
applied.
Cheers
Deri