From owner-freebsd-doc Sun Feb 24 16:49:56 2002 Delivered-To: freebsd-doc@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 3BFEF37B416 for ; Sun, 24 Feb 2002 16:49:53 -0800 (PST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id A6E9978319; Mon, 25 Feb 2002 11:19:50 +1030 (CST) Date: Mon, 25 Feb 2002 11:19:50 +1030 From: Greg Lehey To: Rich Morin Cc: freebsd-doc@freebsd.org Subject: Re: Any troff wizards out there? Message-ID: <20020225111950.E41780@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sunday, 17 February 2002 at 13:33:37 -0800, Rich Morin wrote: > I am using the troff MS macros to generate the front matter for the DOSSIER > volumes. I use the XA macro to create table of contents entries, as: > > .XA 10 > \fCcpp(1:RedHat/cpp)\fR > check out RCS revisions > .XA 11 > \fCctm(1:FreeBSD)\fR > source code mirror system > > Each entry contains two lines. The first line consists of a name (e.g., > cpp) > and a parenthesized designation. The second line contains an (indented) > description. So far so good; everything prints as desired: > > cpp(1:RedHat/cpp) > check out RCS revisions . . . . . . . 10 > > Except that the two lines do not always stay together at the end of a page. > > It's been suggested to me that I use the .ne troff command. Our resident > troff "expert" says this is beyond her. She thinks we need to modify the > .XA macro to "do the right thing". Keeps (as in "keep this line with > next") are created from scratch under troff -ms (there is no keep > command, per se) using diversions. > > Help?? Try this in /usr/share/tmac/tmac.s: --- tmac.s Fri Jan 5 10:50:49 2001 +++ /usr/share/tmac/tmac.s Mon Feb 25 11:19:11 2002 @@ -1456,6 +1456,7 @@ .. .de XA .ie '\\n(.z'toc*div' \{\ +. ne 2v . if d toc*num .toc*end-entry . ie \\n[.$] \{\ . ie '\\$1'no' .ds toc*num Greg -- See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message