🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #3899

Re: Preprocessor for General Text Processing

#3899
From: romwa
Date: Mon, 24 Aug 1987 04:06
49 lines
2422 bytes
In article <1987Aug22.180919.9252@gpu.utcs.toronto.edu>, romwa@gpu.utcs.toronto.edu (Mark Dornfeld) writes:
> In article <1828@super.upenn.edu>, jes@eniac.seas.upenn.edu (Joe Smith) writes:
> > 
> > 	I am preparing to write my thesis using troff and the 
> > other tools from the UNIX Documentors Work Bench (tbl, eqn
> > col) and some of the preprocessors from other sources (lbl,
> > bib,soelim ), but there is one nagging problem, I must constantly
> > remember essentially four languages ( troff, eqn, tbl and the macro
> > package (ME or MS, I haven't decided ).  I am wondering if there
> > is a preprocessor for the whole process that will allow me to say
> > 
> > 	#define .sqroot. @what ever the eqn code is
> > 	#define .ECOLI.  \fIE. coli\fP
> > 	#include ...
> > 
> > 	I am aware that .so exists and I am aware that
> > 
> > 	 .DS EC "\fIE. coli\fP"
> > 
> > would work, but then in the text I would have to reference E. coli
> > in the text every time by saying \*(EC. Not very readable or
> > easy to write.  Does any one know of any public domain or cheap software
> > that would allow me to do this?  I saw a man page that said 
> > 
> > 	SEE ALSO nrpp(1)
> > 
> > Is this what I am looking for?
> 
> A possible solution to this is to postprocess your document
> with sed or awk or even global changes with ed.  (sed is
> preferred).
> 
> Set up your sed script to look like:
> 
> s/.ECOLI./\\fIE. coli\\fP/   (syntax not guaranteed)
> etc...
> etc...
> 
> All you have to do is set up your "defines" with sed syntax,
> and then you t/nroff with a command which looks like:
> 
> eqn file | troff -macro | sed -f sedscript | lp
>
> Give the sed man pages a look for the proper format for a
> sedscript file.
> 
> Mark T. Dornfeld
> utgpu!romwa
> 
Technical Details
Message-ID: <1987Aug24.000642.28212@gpu.utcs.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!romwa
References: <1828@super.upenn.edu> <1987Aug22.180919.9252@gpu.utcs.toronto.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!romwa
From: romwa@utgpu.UUCP
Newsgroups: comp.text
Subject: Re: Preprocessor for General Text Processing
Message-ID: <1987Aug24.000642.28212@gpu.utcs.toronto.edu>
Date: Mon, 24-Aug-87 00:06:42 EDT
Article-I.D.: gpu.1987Aug24.000642.28212
Posted: Mon Aug 24 00:06:42 1987
Date-Received: Mon, 24-Aug-87 01:35:55 EDT
References: <1828@super.upenn.edu> <1987Aug22.180919.9252@gpu.utcs.toronto.edu>
Organization: University of Toronto Computing Services
Lines: 49
Checksum: 22439
Summary: Postprocess -- corrected reply, sorry