[net.unix-wizards] Troff confusion...

hawley (10/21/82)

Our Spinwriter 3015 interprets some handy escape codes.
For example, "ESC W text... ESC &"  will print "text..." in bold face.
Rather than modify/create "term" descriptions for Troff/Nroff,
I just want to be able to define some easy macros,
like ".B" to print some text in bold face.
No amount of coaxing or backslashing will get nroff to
put out a literal "ESC" character, however.
For example,

.de B
\[W \\$1 \[\\&
..

(where "[" is the escape character)
looks like it should work, but doesn't.

How can I do this?

Or, if someone already has a description for spinwriter 3015 printers,
that would work just as well.


- Mike

dan@Sri-Tsc@sri-unix (10/28/82)

Date: 26 Oct 1982 at 0904-PDT
Nroff specifically filters out nasty non-printing characters, except for a few
like control-a and control-g which are handy to use for field delimiting
characters.  There is a table buried in the middle of nroff somewhere (I think
in n1.c or n2.c) which controls the character translation you could change
that.  A better solution would be to change your terminal descriptor so that
the "bdon" and "bdoff" characters point to strings that turn bold on and off.
Then all you have to do is switch to bold font ("\fB" or ".ft B"), and voila!

	-Dan (dan@sri-tsc)