From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6256dcf20812101822g50ab456elba836bb5af4710bb@mail.gmail.com> Date: Wed, 10 Dec 2008 21:22:54 -0500 From: "Gregory Pavelcak" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_103870_18290274.1228962174266" References: Subject: Re: [9fans] troff, refer, and diversions Topicbox-Message-UUID: 5fde4cc0-ead4-11e9-9d60-3106f5b1d025 ------=_Part_103870_18290274.1228962174266 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Well, I guess it's bad form to respond to your own post, but just for the record, I realized that at least one of those number registers that gets set in the footnote macro is important; namely, the one that says you're in a footnote. In tmac.srefs, the macros that print the references use .IP, which in turn calls .RT, which helpfully ends diversions that the user may have forgotten to close. Of course, this all happens before the rest of the reference macro, so the reference never ends up in the diversion. The sad part is that it took me over 24 hours to realize it. Greg On Tue, Dec 9, 2008 at 10:43 PM, Gregory Pavelcak wrote: > I've been writing a paper using -ms macros and refer and refer seems > to work as advertised. Recently I decided I wanted to get references in > endnotes instead of footnotes, so I added some very simple macros, > like FS/FE, around a diversion, thus: > > .de XS > .ev2 > .da XA > .br > .. > .de XE > .br > .di > .ev > .. > > Aside from defining some number registers, the footnote macros > FJ and FK really don't seem to have much more to them than XS/XE, > and the XS/XE pair work as expected when I use them in the text. > However, when I replaced the FS/FE pairing under [2 in tmac.srefs, > the references are output in the text where I had the tags for refer > instead of being put into the diversion. I messed around with > variations on the macros much of the day and can't figure out what > I'm doing wrong. I can't see why FS and FE will work in the sref > macros, but XS/XE won't! > > Thanks and Happy Holidays. I can't believe it's almost Christmas > again! > > Greg > > ------=_Part_103870_18290274.1228962174266 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Well, I guess it's bad form to respond to your own post, but just for the record, I realized that at least one of those number registers that gets set in the footnote macro is important; namely, the one that says you're in a footnote. In tmac.srefs, the macros that print the references use .IP, which in turn calls .RT, which helpfully ends diversions that the user may have forgotten to close. Of course, this all happens before the rest of the reference macro, so the reference never ends up in the diversion.

The sad part is that it took me over 24 hours to realize it.

Greg

On Tue, Dec 9, 2008 at 10:43 PM, Gregory Pavelcak <g.pavelcak@comcast.net> wrote:
I've been writing a paper using -ms macros and refer and refer seems
to work as advertised. Recently I decided I wanted to get references in
endnotes instead of footnotes, so I added some very simple macros,
like FS/FE, around a diversion, thus:

.de XS
.ev2
.da XA
.br
..
.de XE
.br
.di
.ev
..

Aside from defining some number registers, the footnote macros
FJ and FK really don't seem to have much more to them than XS/XE,
and the XS/XE pair work as expected when I use them in the text.
However, when I replaced the FS/FE pairing under [2 in tmac.srefs,
the references are output in the text where I had the tags for refer
instead of being put into the diversion. I messed around with
variations on the macros much of the day and can't figure out what
I'm doing wrong. I can't see why FS and FE will work in the sref
macros, but XS/XE won't!

Thanks and Happy Holidays. I can't believe it's almost Christmas
again!

Greg


------=_Part_103870_18290274.1228962174266--