Question about UCB/Sun version of -ms macros

Arnold Robbins arnold at audiofax.com
Fri Oct 19 08:14:09 AEST 1990


In article <269 at audfax.audiofax.com> I wrote:
>On a Sun 3/60, running SunOS 3.5, I want to use the -ms macros for
>a document I'm working on.  I would dearly love to be able to produce
>a table of contents, and indeed the ms(7) man page lists a .TC macro.
>But I get no results from it.  It appears that the -ms macros are the
>ones developed at UCB and not the original V7 macros.

After some helpful email from the net, and some experimentation, I cobbled
up the following macro.  It is used *in place of* the .NH macro and the
following title in your text.  I.e., instead of

	.NH 2
	Second Level Heading Title

you type

	.HN 2 "Second Level Heading Title"

Use .TC at the end of your paper.  Here is the macro.  Share and enjoy:

	."
	." HN - Headings that are numbered and produce a Table of Contents entry
	."
	." Usage:   .NH level "text"
	."
	.de HN
	.NH \\$1
	\\$2
	.XS \\n(PN
	\\*(SN \\$2
	.XE
	..
-- 
Arnold Robbins				AudioFAX, Inc. | Laundry increases
2000 Powers Ferry Road, #200 / Marietta, GA. 30067     | exponentially in the
INTERNET: arnold at audiofax.com Phone:   +1 404 933 7612 | number of children.
UUCP:	  emory!audfax!arnold Fax-box: +1 404 618 4581 |   -- Miriam Robbins



More information about the Comp.unix.questions mailing list