Article View: net.text
Article #749Re: NROFF/TROFF Help
From: andrew
Date: Wed, 22 Jan 1986 10:53
Date: Wed, 22 Jan 1986 10:53
41 lines
1884 bytes
1884 bytes
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
Technical Details
Message-ID:
<777@stc-b.stc.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!stc!andrewReferences:
<672@dayton.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!stc!andrew From: andrew@stc.UUCP Newsgroups: net.text Subject: Re: NROFF/TROFF Help Message-ID: <777@stc-b.stc.UUCP> Date: Wed, 22-Jan-86 05:53:12 EST Article-I.D.: stc-b.777 Posted: Wed Jan 22 05:53:12 1986 Date-Received: Sun, 26-Jan-86 04:47:18 EST References: <672@dayton.UUCP> Reply-To: andrew@stc.UUCP (Andrew Macpherson) Organization: STC Telecoms, London N11 1HB. Lines: 41