groff
[Top][All Lists]
Advanced

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

[Groff] Fw: Small bug in groff 1.19.2 footnote number control?


From: Werner LEMBERG
Subject: [Groff] Fw: Small bug in groff 1.19.2 footnote number control?
Date: Sun, 16 Sep 2007 15:47:17 +0200 (CEST)

--- Begin Message --- Subject: bug-groff post from address@hidden requires approval Date: Sun, 16 Sep 2007 09:23:12 -0400
As list administrator, your authorization is requested for the
following mailing list posting:

    List:    address@hidden
    From:    address@hidden
    Subject: RE: Small bug in groff 1.19.2 footnote number control?
    Reason:  Post by non-member to a members-only list

At your convenience, visit:

    http://lists.gnu.org/mailman/admindb/bug-groff
        
to approve or deny the request.
--- Begin Message --- Subject: RE: Small bug in groff 1.19.2 footnote number control? Date: Sun, 16 Sep 2007 14:22:55 +0100 (BST)
Regarding footnote numbering, when you want to reset the
footnote number to 1 for the next footnote, try

.nr ft*nr 0 1

since (unless things have changed recently) the mm macros
store the footnote number from the previous footnote in
\n[ft*nr], which is auto-incrementing whenever \*F is called,
since \*F is defined as

.ds F \v'-.4m'\s-3\\n+[ft*nr]\s0\v'.4m'

(\n[ft*nr] is initialised by the same ".nr ft*nr 0 1", which
gives it an initial value of 0, to be incremented by 1 every
time it is referenced as \n+[ft*nr], as opposed to referencing
it as \n[ft*nr] which simply outputs its value but does not
increment it).

I don't think classic troff mm's ":p" has ever been in groff's
mm, which has used "ft*nr" as long as I've known it (about 1990)!
So your

.nr :p 0

would simply set a number register which never gets used!

Hoping this helps,
Ted.


On 16-Sep-07 10:10:42, Luke Kendall wrote:
> Hi.  The last few days, I've been dusting off my wife's
> doctoral thesis, done in 1988 with the original troff and
> mm macro package, and making it work in groff. groff/tbl/pic
> and the new mm package stood up remarkably well to the tough
> challenge!
> 
> One small problem is that it seems that either groff is no
> longer using the number register called ":p" for storing the
> footnote numbers, or else the instruction ".nr :p 0" isn't
> taking effect.  So we can't reset the footnote number to 0
> at the start of each new chapter.
> 
> Here's a small example that shows the problem (the footnotes
> in this example are numbered 1, 2, 3 - they should be 1, 2, 1).
> 
> test.mm, format with groff -t -p -mm test.mm -Tps > test.ps:
> 
> .P
> Some text
> .P
> Test footnote number resetting.
> First, this should be number 1\*F
> .FS
> I hope this is one.
> .FE
> So this should be number 2\*F
> .FS
> I hope this is two.
> .FE
> .P
> So let's reset the footnote number register to 0 and make a
> fresh footnote.
> .nr :p 0
> .P
> Okay, this footnote should also be number 1\*F
> .FS
> Is it?  It isn't, in my wife's thesis when we do this.
> .FE
> 
> Oh, I also get a segmentation fault in grohtml if I try to
> convert my wife's thesis to html with -Thtml (in contrast to -Tps).
> 
> If you're interested, I can provide you with the data files.
> grohtml works well for me in other uses, but I can believe
> that my wife's thesis would trigger bugs (it uses tbl in
> stressful ways, one footnote is so long that I had to add
> a .vs -4 to avoid a bug in groff overprinting the following
> page over the footnote body, and it even uses pic to overdraw
> a line over a table on one page, via the use of diversions).
> 
> Regards,
> 
> luke

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 16-Sep-07                                       Time: 14:22:51
------------------------------ XFMail ------------------------------



--- End Message ---
--- Begin Message --- Subject: confirm 4ee9d83285e7b0d62e989acb265baf1a95f55290
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message.  Do this if the message is
spam.  If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list.  The Approved: header can also appear in the first line
of the body of the reply.

--- End Message ---

--- End Message ---

reply via email to

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