bug-groff
[Top][All Lists]
Advanced

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

Re: groff (tbl/troff) gets confused when page number register format is


From: Ralph Corderoy
Subject: Re: groff (tbl/troff) gets confused when page number register format is roman, not decimal
Date: Mon, 23 Aug 2004 08:58:25 GMT

Hi Jonathan,

> That is unnecessarily verbose (sorry!).  The following three lines are 
> sufficient:
> 
> .pn 9
> .af % i
> xxxx
> 
> The command line is then 'groff -Tps -mm tblbug2.n > tblbug2.ps',
> except the file name is a complete misnomer now.  The '-mm' option is
> necessary.  Changing the page number (9 to 8, for example) changes the
> detail of the error message (complaining about i instead of x); change
> the page number to 5 and the complaint is about '='.

CSTR 54 points out that using .af changes the format of \n% in all
places, including expressions, so tests of equality of \n% to 1 may not
work well when we're on page `i'.

I played around a little bit.  Maybe this helps you get to a solution.

    $ echo .pn 9/.af % i/xxxx | tr / \\012 | groff -Tascii -mm | grep .
    <standard input>:3: expected `;' after scale-indicator (got `x')
    troff: expected `;' after scale-indicator (got `x')
                                       - 1 -
           xxxx
    $ echo .pn 9/.af P i/xxxx | tr / \\012 | groff -Tascii -mm | grep .
                                       - i -
           xxxx
    $ echo .nr P 9/.af P i/xxxx | tr / \\012 | groff -Tascii -mm | grep .
                                       - x -
           xxxx
    $ 

groff_mm(7) describes \nP.

Cheers,

-- 
Ralph Corderoy.      http://inputplus.co.uk/ralph/     http://troff.org/




reply via email to

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