🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4507

underlining in [nt]roff

#4507
From: Steve Ring
Date: Tue, 08 Mar 1988 15:23
40 lines
1495 bytes
Here is my macro for underlining, whether in nroff or troff. You can replace
the "cu" with "ul" if you only want to underline separate words. 
"cu" is continuous underline. Call it with

	.uc underline these words
 -or-
	.uc "underline this word that consists of over 9 separate words"

For transmission purposes, I used "^" as the separator character in the .if
statements. Change this to say <Control Shift G> so that you don't use a
character ("^") that you might have used in a word.


.\"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>
.\"        .uc  -UNDERLINE every character up to 9 words
.de uc 
.ds U} "\\$1
.if !^^\\$2^ .as U} " \\$2
.if !^^\\$3^ .as U} " \\$3
.if !^^\\$4^ .as U} " \\$4
.if !^^\\$5^ .as U} " \\$5
.if !^^\\$6^ .as U} " \\$6
.if !^^\\$7^ .as U} " \\$7
.if !^^\\$8^ .as U} " \\$8
.if !^^\\$9^ .as U} " \\$9
.if n \{\
.	cu 1
\\*(U}
.	cu 0
.\}
.if t \\*(U}\l'|0\(ul'
.rm U}
..
.\"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>

-- 
...!{decvax,ima,ism780c,ulowell,laidbak,cgeuro,cg-f}!cg-atla!ring
Steve Ring 
CompuGraphic Corp. 
Wilmington, Mass., 01887, (617) 658-5600, x5092
Technical Details
Message-ID: <2050@cg-atla.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!m2c!ulowell!cg-atla!ring

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!m2c!ulowell!cg-atla!ring
From: ring@cg-atla.UUCP (Steve Ring)
Newsgroups: comp.text
Subject: underlining in [nt]roff
Message-ID: <2050@cg-atla.UUCP>
Date: 8 Mar 88 15:23:42 GMT
Distribution: comp
Organization: Compugraphic Corp., Wilmington, Mass
Lines: 40
Keywords: underline, [nt]roff