[net.text] NROFF/TROFF Help

sjm@dayton.UUCP (Steven J. McDowall) (01/16/86)

Help! 
I'm working on a document using nroff/troff with the 
mm macros. My question is this:

How can I set the document up so the headers come out as:
. First level headers are capital roman numerals (eg. I, II, etc.)
. Lower levels are arabic, and concatenated, but not* with the
  first level.

Example.
I.	Major Section
1.	First point under major
1.1	First point under above minor
1.1.1 	etc.

2.	Blah...

This is the format of the "Document Processing Guide" for the Unix
System, by Western Electric (Publication Number: 341-920).

I think some fiddling with the .HX macros are in order, but I don't
know how (or which ones).




-- 
Steven J. McDowall	
Dayton-Hudson Dept. Store. Co.		UUCP: ihnp4!rosevax!dayton!sjm
700 on the Mall				ATT:  1 612 375 2816
Mpls, Mn. 55408

andrew@stc.UUCP (01/22/86)

In article <672@dayton.UUCP> sjm@dayton.UUCP (Steven J. McDowall) writes:
>I'm working on a document using nroff/troff with the 
>mm macros. My question is this:
>
>How can I set the document up so the headers come out as:
>. First level headers are capital roman numerals (eg. I, II, etc.)
>. Lower levels are arabic, and concatenated, but not* with the
>  first level.
>
>Example.
>I.	Major Section
>1.	First point under major
>1.1	First point under above minor
>1.1.1 	etc.
>
>This is the format of the "Document Processing Guide" for the Unix
>System, by Western Electric (Publication Number: 341-920).
>
>I think some fiddling with the .HX macros are in order, but I don't
>know how (or which ones).
>-- 
>Steven J. McDowall	
>Dayton-Hudson Dept. Store. Co.		UUCP: ihnp4!rosevax!dayton!sjm
>700 on the Mall				ATT:  1 612 375 2816
>Mpls, Mn. 55408

You can achieve the result you want with:

	.HM I \" Set Roman for first Level Heading
	.de HX \" rebuild the heading number ommiting level 1 if level > 1
	.if0\\$2-1 .ds }0 \\n(H2.
	.if0\\$2-2 .as }0 \\n(H3
	.if0\\$2-3 .as }0 .\\n(H4
	.if0\\$2-4 .as }0 .\\n(H5
	.if0\\$2-5 .as }0 .\\n(H6
	.if0\\$2-6 .as }0 .\\n(H7
	..
-- 
Regards,
	Andrew Macpherson.	<andrew@tcom.stc.co.uk>
	{aivru,creed,datlog,iclbra,iclkid,idec,inset,root44,stl,ukc}!stc!andrew