Neat little alias & technique to facilite troff
jhv at houxu.UUCP
jhv at houxu.UUCP
Sat Jan 17 06:00:44 AEST 1987
In article <595 at cubsvax.UUCP>, peters at 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.
More information about the Comp.sources.bugs
mailing list