[Top][All Lists]

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

RE: Small bug in groff 1.19.2 footnote number control?

From: Ted Harding
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,

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 ------------------------------

reply via email to

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