ietf
[Top] [All Lists]

Re: I-D nroff macros

2000-01-04 21:10:02
Glen Zorn wrote:

Alan Blount <blount(_at_)media(_dot_)mit(_dot_)edu> writes:

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?

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.

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
        tony(_at_)att(_dot_)com



<Prev in Thread] Current Thread [Next in Thread>