🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.sources.bugs
Article #903

Re: Neat little alias & technique to facilite troff

#903
From: jhv
Date: Fri, 16 Jan 1987 20:00
16 lines
1322 bytes
In article <595@cubsvax.UUCP>, peters@cubsvax.UUCP (Peter S. Shenkin) writes:
> First I put this alias in my .login:
> 	alias roff 'sed -e 1s/\.\.// -e 1s/@/!*/ -e 2,\$d !* | sh &'
> Then I begin each troff source file with a line like:
> 	..eqn @ | ltroff -me

My approach is to use the shell's "here-document" capability, putting the
command line  to format the document as the first line of the document, and
executing the file when I need processed output, for example (to include
tbl, eqn, and pic preprocessors and to print the output on an Imagen
printer):
	tbl <<!EOF | eqn | pic | troff -mm | ipr -ltroff
	...
	!EOF
Then either make the file executable with chmod, or type sh filename to get
the formatted output.
Technical Details
Message-ID: <920@houxu.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!houxm!houxu!jhv
References: <595@cubsvax.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!cbatt!ihnp4!houxm!houxu!jhv
From: jhv@houxu.UUCP
Newsgroups: net.sources.bugs
Subject: Re: Neat little alias & technique to facilite troff
Message-ID: <920@houxu.UUCP>
Date: Fri, 16-Jan-87 15:00:44 EST
Article-I.D.: houxu.920
Posted: Fri Jan 16 15:00:44 1987
Date-Received: Sat, 17-Jan-87 06:58:57 EST
References: <595@cubsvax.UUCP>
Organization: AT&T, Holmdel, NJ
Lines: 16
Keywords: troff, word processing, text processing, typesetting
Summary: Using shell "here-document" capability