Subject: I-D nroff macros

From: Alan Blount <[email-masked]>
Date: Tue, 04 Jan 2000 14:47:42 -0500

I've been using the simple set of nroff macros, as described by

  http://www.ietf.org/internet-drafts/2-nroff.template

While this works, I'd like to be able to autogenerate section numbers
and table of contents entries.  This draft doesn't give any guidance.
I tried the -ms macros, as described by

  http://www.cs.berkeley.edu/%7Ejanp/Help/textms.html

but the header macro .NH creates the header in boldface, which is a
no-no according to RFC 2223.  

I imagine there is a way to do this, but I am ignorant of the
necessary kung-fu.  Does anyone have a sample nroff file, perhaps a
draft they've written, that generates heading numbers and a toc?

Thanks,
Alan Blount
[email-masked]

---

From: Rodent of Unusual Size <[email-masked]>
Date: Tue, 04 Jan 2000 15:25:05 -0500

I maintain my drafts (such as they are) in HTML, and I use
a couple of Perl scripts to turn the Lynx output into something
digestible for the I-D directories, including TOC generation and
pagination.

FWIW..
-- 
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>

---

From: Rodent of Unusual Size <[email-masked]>
Date: Tue, 04 Jan 2000 15:25:05 -0500

FWIW..
-- 
#ken    P-)}

---

From: "Matt Crawford" <[email-masked]>
Date: Tue, 04 Jan 2000 17:11:02 -0600

Alan,

  I'll send you my internet-draft nroff macros under separate cover.
(There's probably some internet obscenity law forbidding the
unsolicited transmission of nroff source.)

				Matt

---

From: "Matt Crawford" <[email-masked]>
Date: Tue, 04 Jan 2000 17:11:02 -0600

Alan,

				Matt

---

From: "Glen Zorn" <[email-masked]>
Date: Tue, 4 Jan 2000 17:38:54 -0800

> draft they've written, that generates heading numbers and a toc?

There are a couple of ways to do it, either by rolling your own macros or by
making a minor change to the ms macros themselves (the approach I took).  I
can send you my macro package if you like; however, it doesn't do automatic
TOC processing.

>
> Thanks,
> Alan Blount
> [email-masked]
>
> -
> This message was passed through [email-masked], which
> is a sublist of [email-masked]. Not all messages are passed.
> Decisions on what to pass are made solely by Harald Alvestrand.
>

---

From: "Glen Zorn" <[email-masked]>
Date: Tue, 4 Jan 2000 17:38:54 -0800

---

From: Tony Hansen <[email-masked]>
Date: Tue, 04 Jan 2000 23:03:22 -0500

> can send you my macro package if you like; however, it doesn't do automatic

If you send your nroff input file to the RFC editor as well as the
nroff'd output file, which is the recommended practice, then modifying
the ms macros themselves is not an option.

Automatic TOC processing cannot be done directly within nroff unless you
are willing to accept the TOC at the end of the document. To place the
TOC at the beginning of the document usually requires two passes. The
first pass is used to generate the TOC, which is then sourced (.so'd)
into the document for the second pass.

	Tony Hansen
	[email-masked]

---

From: Tony Hansen <[email-masked]>
Date: Tue, 04 Jan 2000 23:03:22 -0500

Tony Hansen
	[email-masked]

---

From: "Matt Crawford" <[email-masked]>
Date: Wed, 05 Jan 2000 08:39:59 -0600

> the ms macros themselves is not an option.

Well, sort of.  You can .rm an existing macro and .de it differently.
I do that for the SH, H, XS, XA, XE, XE and TC requests, then use
soelim to put my macros into the nroff source I send to rfced.  So
far no feedback from that quarter, positive or negative.

> into the document for the second pass.

That's the LaTeX-like way.  What I do is start a draft-with-TOC with

	.so tmac.idt
	.pi ./fixtoc.sh

where fixtoc is Postel's fix.sh with the added function of moving the
TOC from the end to a marked point near the front.

				Matt

(But the fun part was computing the six-months-plus-five-days
expiration date in nroff.)

---

From: "Matt Crawford" <[email-masked]>
Date: Wed, 05 Jan 2000 08:39:59 -0600

.so tmac.idt
	.pi ./fixtoc.sh

				Matt