[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] mm header/footer bug
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] mm header/footer bug |
Date: |
Thu, 27 Feb 2003 14:32:01 +0100 |
User-agent: |
Mutt/1.4i |
> groff -mm -rW=6.75i test.mm # workaround, proper output
> groff -mm -rW=6.75i -rTEST=1 # "can't break line" warnings
> groff -mm -rW=6.75i -rTEST=2 # both rules end up in the footer
One thing to keep in mind is that titles (.tl) are printed
independently of the running text (and are output immediately),
and also use a different "line length" (set with .lt). In mm,
the page header and footer is processed in a different
environment than the body text. It seems that mm sets
the title length in this environment consistent with the W
register, but it does not set the line length. Since your
line length is greater than the default, if you draw the
lines not in a .tl request (TEST=1 and TEST=2), the line
content is too large and troff complains. Setting the line
length in the environment (TEST=2) resolves this. However,
in your example you haven't explicitly terminated the line
(using .sp instead of 'sp would do this, or an explicit .br),
so it does not get output but stays in the environment until
new stuff is added in this environment, which happens in the
page footer, resulting in two lines there, one from the header,
one from the footer. Your use of \p in the footer line also
causes the line to be output.
But as you rightly figured out, using .tl is the easiest (and
probably cleanest) way to achieve what you want. (However, I
would suggest drawing lines with \D.)