groff
[Top][All Lists]
Advanced

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

[Groff] mm header/footer bug


From: Larry Kollar
Subject: [Groff] mm header/footer bug
Date: Wed, 26 Feb 2003 23:03:31 -0500

I've run this down as far as I can. My intent is to put a rule in the headers & footers, and using .tl is a reasonable workaround for now. I see the same problem with groff 1.17.2, 1.18, and yesterday's CVS.

Use the attached test file to see what problems I've run into. I've set up some conditionals to roll the various hassles into one file.

        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

In a nutshell, the header/footer environment doesn't pick up the value of W (which is copied to the register @ll for general use). You can confirm this by adding a request like ".tm \\n[.l] != address@hidden" to the TP or EOP macros in test.mm. TEST=1 draws a horizontal line (\l'address@hidden'), and since the line is wider than the official width you get the warnings. The output appears correct, however.

The obvious (but problematic) solution is to adjust the line width in the header environment by putting ".ll address@hidden" in TP or EOP. TEST=2 does this, then draws the line as described above. I have *no* idea what's causing the results I'm seeing, and I'm curious why doing this causes such problems. A sufficiently long input file, 60 pages or maybe a little shorter, causes an overflow and groff dies with an error.

I settled on using .tl ||\l'address@hidden'|| to draw the rule, and that works without warnings. Use TEST=0 or omit the register to see it. My actual customization file does a lot more, such as inserting a generous sidehead area and eliminating section numbering, and I think it looks pretty good. :-)

Attachment: test.mm.gz
Description: GNU Zip compressed data


--
Larry Kollar        k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: the Revival
http://www.alltel.net/~kollar/utp

reply via email to

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