groff
[Top][All Lists]
Advanced

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

Re: [Groff] Odd ms Macro Page Offset Register Behavior


From: Ted Harding
Subject: Re: [Groff] Odd ms Macro Page Offset Register Behavior
Date: Mon, 19 Jan 2004 00:45:47 -0000 (GMT)

On 18-Jan-04 Andrew J. Piziali wrote:
>    Following up on my question a couple of weeks ago regarding the
> misformatting of ms macro footers when an earlier .if request succeeds,
> I further isolated the problem.  It may be succinctly stated as
> follows:

I think I have a clue about your problem.

It seems that it is yet another unwanted side-effect of the "blank line
action".

On my system (groff 1.18.1 on Red Hat 9 Linux), if you start your
test file with

.de nothing
..
.blm nothing
.if 1 \{ 
.  nr xyz 13
.\} 
.ps 11
.nr PS 11\"                             point size
.vs 13p
.nr VS 13\"                             vertical spacing
.nr LL 4.75i\"                          line length for troff
.ll \n(LLu\"                            use LL for first page also
.nr PO 1.875i\"                         page offset
.po \n(POu\"                            use PO for first page also
.EF '%'Even Footer''
.OF ''Odd Footer'%'
.NH 1
[etc]

then all will be well. On the other hand, comment out the lines

.de nothing
..
.blm nothing

and the anomalous behaviour occurs, using

  groff -Tps -ms file.tr > file.ps

I recall that, several weeks ago, I reported an effect of the
blank line macro where 'pic' was used. That time, however, it was
the other way round: with ".blm nothing", parts of a 'pic' diagram
were incorrectly placed when the 'pic' command "shade" was used.
When the bank line macro was restored to default with ".blm", all
was well.

It seems that something is wrong with the blank line macro.
And possibly also with false "recognition" of blank lines which are
in fact not there (which they were not in the output from 'pic'):
this is suggestive in combination with your observation that it is
only multiline ".if"s which cause the problem, when the "'if" test
comes out positive: when the test is negative, then the contents of
the ".if" are not interpreted. It is as though troff was "finding"
a blank line inside

.if 1 \{ 
.  nr xyz 13
.\} 

With troff, a blank line is equivalent to a break (".br") unless
a blank line macro has been defined (as in ".blm nothing").
When this occurs before any input is read: "a pseudo-page transition
onto the first page occurs either when the first /break/ occurs
or when the first /non-diverted/ text processing occurs. Arrangements
for a trap to occur at the top of the page must be completed before
this transition." (AT&T CSTR No 54, "Troff User's Manual", 1992).

In that case, this may prevent your footers being formatted as
you wish (it looks as though the problem is that footer line length
is wrong, when your anomaly occurs; however, it is puzzling that
this changes from page to page).

Hmmm.
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 19-Jan-04                                       Time: 00:45:47
------------------------------ XFMail ------------------------------

reply via email to

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