Date: Mon, 25 Feb 2002 11:19:50 +1030 From: Greg Lehey <grog@FreeBSD.org> To: Rich Morin <rdm@cfcl.com> Cc: freebsd-doc@freebsd.org Subject: Re: Any troff wizards out there? Message-ID: <20020225111950.E41780@wantadilla.lemis.com> In-Reply-To: <p0510030db895d1bd9db9@[192.168.254.205]> References: <p0510030db895d1bd9db9@[192.168.254.205]>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020225111950.E41780>
