🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.text
Article #258

set of index entry macros for -me, with diversion fix

#258
From: PAD Powell [Admin]
Date: Fri, 25 May 1984 15:30
87 lines
3168 bytes
The following little macro set can be used to add figure tables,
etc. to your thesis.  It also eliminates some problems with floating
keeps and index entries.


.de +x		\" *** single line, bombproof index entry
.\"	.+x <index> [p1 - p6]
.\"	Patrick Powell (padpowell@wateng), Jose Mussi (jmmussi@wateng)
.\"	University of Waterloo, VLSI Research Group
.\"	This macro is designed to be used inside anything
.\"	that might be involved with floating keeps, or diversions.
.\"	If that is the case, badly formatted index entries can
.\"	result, due to the interaction of the environments,
.\"	diversion expansions, and "unguarded text".  Anything that
.\"	is not a request which is processed by a diversion has
.\"	the current processing of that diversion performed;
.\"	since indents (.in) are INHERITED, you get progressively
.\"	indented text.
.\"
.\"	For example, if you had a figure, and put it in a floating
.\"	keep, like so:
.\"	.(z
.\"	.sp 2i	\" leave space for figure
.\"	.ce
.\"	Figure 1
.\"	.(x f
.\"	.sp 1v
.\"	Figure 1
.\"	.)x
.\"	.)z
.\"	You might find the following index entry formats, depending on
.\"	how far the float had to go, etc.
.\"	Figure 1 ...... 1
.\"	     Figure 1
.\"	 .............. 1
.\"		Figure 1
.\"	 .............. 1
.\"
.\"	Solution to this problem is the .+x macro, which is passed the
.\"	index, and the index entries
.\"	.+x f ".sp 1v" "Figure 1"
.\"
.\"	The way this is done is similar to the .(x macro, and has
.\"	been unabashedly been stolen.  If you want to use the other
.\"	.)x P A
.\"	options, define a similar set of macros, setting P if $2
.\"	is non-null, and A if $3 is non-null;  this is the +y
.\"	macro.
.if \\n@>4 .tm >> +x \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7
.\" please note these cases MUST be in this order
.ie !"\\n(.z"" \
\{\
\!.+x "\\$1"  "\\$2"  "\\$3"  "\\$4"  "\\$5"  "\\$6"  "\\$7"
.\}
.el \
\{\
.	(x \\$1
.	if !""\\$2" \\$2
.	if !""\\$3" \\$3
.	if !""\\$4" \\$4
.	if !""\\$5" \\$5
.	if !""\\$6" \\$6
.	if !""\\$7" \\$7
.\"	NOTE: no tab before )x, .am will fail to close; see .(x macro, and
.\"	TROFF Reference Manual, .de request
.)x
.\}
..
.de +y	\" allow the setting of (x P A
.if \\n@>4 .tm >> +y \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7
.\" please note these cases MUST be in this order
.ie !"\\n(.z"" \
\{\
\!.+y "\\$1"  "\\$2"  "\\$3"  "\\$4"  "\\$5"  "\\$6"  "\\$7"
.\}
.el \
\{\
.	(x \\$1
.	if !""\\$4" \\$4
.	if !""\\$5" \\$5
.	if !""\\$6" \\$6
.	if !""\\$7" \\$7
.\"	NOTE: no tab before )x, .am will fail to close; see .(x macro, and
.\"	TROFF Reference Manual, .de request
.)x \\$2 \\$3
.\}
..
Technical Details
Message-ID: <1032@wateng.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!wateng!padpowell

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site wateng.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!wateng!padpowell
From: padpowell@wateng.UUCP (PAD Powell [Admin])
Newsgroups: net.text,net.unix
Subject: set of index entry macros for -me, with diversion fix
Message-ID: <1032@wateng.UUCP>
Date: Fri, 25-May-84 11:30:34 EDT
Article-I.D.: wateng.1032
Posted: Fri May 25 11:30:34 1984
Date-Received: Thu, 31-May-84 20:10:56 EDT
Organization: U of Waterloo, Ontario
Lines: 87