Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!romwa From: romwa@utgpu.UUCP Newsgroups: comp.text Subject: Re: Preprocessor for General Text Processing Message-ID: <1987Aug22.180919.9252@gpu.utcs.toronto.edu> Date: Sat, 22-Aug-87 18:09:19 EDT Article-I.D.: gpu.1987Aug22.180919.9252 Posted: Sat Aug 22 18:09:19 1987 Date-Received: Sun, 23-Aug-87 10:17:13 EDT References: <1828@super.upenn.edu> Organization: University of Toronto Computing Services Lines: 44 Checksum: 58236 Summary: Postprocess!! 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 run a command which looks like: eqn file | troff -macro | lp Mark T. Dornfeld utgpu!romwa