groff
[Top][All Lists]
Advanced

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

Re: [Groff] RE: Small bug in groff 1.19.2 footnote number contro


From: Luke Kendall
Subject: Re: [Groff] RE: Small bug in groff 1.19.2 footnote number contro
Date: Mon, 17 Sep 2007 20:58:39 +1000
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

(Ted Harding) wrote:
> On 16-Sep-07 22:15:55, Werner LEMBERG wrote:
>>>> 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)!
>>> The obvious "solution" to that "problem" is to add:
>>>
>>>      .als :p ft*nr
>>>
>>> to the mm macros like is done for other obscure number registers.
>> In case this fixes the problem I'll apply this change to the source
>> file.  Luke, can you verify it?

I tried that, fully expecting it to work - but it didn't!

But changing each new chapter to set ft*nr to 0 worked.  Thanks for
telling me what the groff number register for footnotes was!

For your reference, feel free to play with the attached test file.

>>     Werner
> 
> I would like to suggest that, before anything is done generally
> in groff, we should get to the bottom of where this ":p" is
> coming from.

It's a genuine troff mm-ism.  E.g. we found out about it from the book
by Narain Gehani (of AT&T) "Document Formatting and Typesetting on the
UNIX System", ISBN 0 -9615336-0-9 (highly recommended, BTW).

> I don't have access to macro files for other troffs at the
> moment, but I've browsed around in such documentation as
> I can find, without seeing a reference to a number register
> ":p" in mm. Not that this disproves its existence, since
> a lot of troff documentation (indeed like a lot of groff's)
> doe not refer much to "internal registers"; nor have I got
> access to much documentation!
> 
> Perhaps ":p" is specific to a particular version of troff,
> as used by Luke's wife for her thesis. If it's not generic,
> then I doubt we should add too many such "special patches"
> to groff.

I hope the above reference is helpful.

> So let's wait for Luke to tell us more detail! In particular,
> which "make" of troff, what year, version of mm macros?

It took quite a few years for my wife to finish the thesis.  I think she
started using troff of one form or another between 1984-1988.  I do have
a copy of one of the mmt files around, so I can tell you one of them at
least was:

'''\"   UNIX Memorandum Macros - 16.29 of 2/27/83
'''\"   TROFF Version   @(#)mmt.src     16.29

Oh, I see I have a few versions lying around:

==> /home/stella/Archives/thesis/mm/mmt <==
'''\"   UNIX Memorandum Macros - 16.49 of 2/27/86
'''\"   TROFF Version   @(#)mmt.src     16.49
'''\"#ident     "@(#)macros:mmt.src     16.49"

==> /home/stella/Archives/thesis/mmt.new <==
'''\"   UNIX Memorandum Macros - 16.49 of 4/17/86
'''\"   TROFF Version   @(#)mmt.src     16.49
'\"#ident       "@(#)macros:mmt.src     16.49"

==> /home/stella/Archives/thesis/mmt.old <==
'''\"   UNIX Memorandum Macros - 16.29 of 2/27/83
'''\"   TROFF Version   @(#)mmt.src     16.29
.nr:a 0 1

==> /home/local/lib-posh/macros/mmt <==
'''\"   9442 Memorandum Macros - 15.110 of 5/6/80
'''\"   TROFF Version   @(#) mmt.src.src 1.1 87/09/03
.nr:a 0 1

It worked in all of them, and we used BSD systems and System V unix.

They all have the same (only two) references to ":p":

.nr:p 0 1

and in the (long) definition of "H":

.if\\n(:C .nr :p 0 1 \}

Thanks for the help, it's much appreciated!

HTH,

luke

> Best wishes to all,
> Ted.
> 
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <address@hidden>
> Fax-to-email: +44 (0)870 094 0861
> Date: 17-Sep-07                                       Time: 00:25:15
> ------------------------------ XFMail ------------------------------
> 
> 

'\" Try this:
.als :p ft*nr
'\" Didn't work.
.P
Some text
.P
Test footnote number resetting.
First, this should be number 1\*F
.FS
I hope this is 1.
.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
'\" try this:
.nr ft*nr 0 1
'\" Yep, that works.
.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

reply via email to

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