[comp.misc] nroff eats my esc codes

twomey@sunybcs.uucp (Bill Twomey) (07/24/87)

Is there any way of letting nroff pass escape through
to the final document?  I'm trying to play with an HP LaserJet,
and I need assorted coses preceeded by escape, \033.
I have tried putting them on lines with \!, which is supposed
to copy through the contents of the line.  I have had no luck.

Any ideas would be greatly appreciated.

-Bill
twomey@gort.cs.Buffalo.EDU   Usenet: ...{rocksvax|decvax}!sunybcs!twomey
Bitnet: twomey@sunybcs   CSnet: twomey%buffalo.csnet@csnet-relay

larry@kitty.UUCP (Larry Lippman) (07/24/87)

In article <4219@sunybcs.UUCP>, twomey@sunybcs.uucp (Bill Twomey) writes:
> Is there any way of letting nroff pass escape through
> to the final document?  I'm trying to play with an HP LaserJet,
> and I need assorted coses preceeded by escape, \033.
> I have tried putting them on lines with \!, which is supposed
> to copy through the contents of the line.  I have had no luck.
> 
> Any ideas would be greatly appreciated.

	I am not certain if this is "acceptable procedure", but on DWB
for the 3B2, I insert escape codes literally using vi (i.e., CTRL-V followed
by ESC), and they pass through nroff quite well.
	Neither I nor anyone else in my organization has ever encountered
any bugs or problems in doing this on thousands of document pages during the
past three years.
	I have heard from others that the above method is NOT "acceptable
procedure", but if it works reliably on my nroff version, why not?

<>  Larry Lippman @ Recognition Research Corp., Clarence, New York
<>  UUCP:  {allegra|ames|boulder|decvax|rocksanne|watmath}!sunybcs!kitty!larry
<>  VOICE: 716/688-1231        {hplabs|ihnp4|mtune|seismo|utzoo}!/
<>  FAX:   716/741-9635 {G1,G2,G3 modes}    "Have you hugged your cat today?" 

nga@root.co.uk (Nick Armitage) (07/28/87)

In article <1874@kitty.UUCP>, larry@kitty.UUCP (Larry Lippman) writes:
> In article <4219@sunybcs.UUCP>, twomey@sunybcs.uucp (Bill Twomey) writes:
> > Is there any way of letting nroff pass escape through
> > to the final document?  I'm trying to play with an HP LaserJet,

i don't know what the real way of doing this is because i'm not an nroff guru
(although i have no problems getting  ditroff  to produce really wizzo output
on our laser printers),  but i recall this being a problem on a version seven
(!) system which i used when i was still in diapers..

one of the users was trying to coax a  diablo 630  to do something weird with
escape codes. the operation which he wanted it to do was not described in the
printer-specific file "T630-12" or some-such.

not having source to regenerate the file, he hacked it using adb so that when
he tried to print a code that he wasn't using for other things to the diablo,
instead of doing nothing (normal behaviour for an undefined  printer-specific
character i think) it sent an escape to the diablo.

i realise that this is a really ghastly hack, and that  there may  well be a
kosher way to do this, but it worked.

hope this helps..

nick
-
Nick Armitage, Root Technical Systems, 3 Hayne Street, London, EC1A 9HH.
phone:  +44 1 606 7799   fax:  +44 1 726 8158   telex:  885995 ROOT G
My opinions do not necessarily represent those of any ROOT-Unisoft company.

pls@sortac.UUCP (Pat Sullivan) (07/29/87)

In article <4219@sunybcs.UUCP>, twomey@sunybcs.uucp (Bill Twomey) writes:
> Is there any way of letting nroff pass escape through
> to the final document?  I'm trying to play with an HP LaserJet,
> and I need assorted coses preceeded by escape, \033.
> I have tried putting them on lines with \!, which is supposed
> to copy through the contents of the line.  I have had no luck.

If you have DWB2, you can easily add special characters in your
"/usr/lib/nterm/tab.???" file and then call on them in your
document as "\(whatever".  This also keeps your document from
being hard-wired to the LaserJet.

finegan@uccba.UUCP (Mike Finegan) (08/13/87)

> i don't know what the real way of doing this is because i'm not an nroff guru
> (although i have no problems getting  ditroff  to produce really wizzo output
> on our laser printers), ...

  I have a problem with neqn, and since DEC software support can't help,
  maybe someone has solved the problem already, or can at least send me a
  copy of a tabXXXX.c file that definitely works for the problem.
  The problem:
	I follow the directions of BSD manuals, and enter control codes
	into a file containing a structure (took the default, and put my
	codes in) appropriate for terminal definition file for nroff -TXXXX .
	I can get everything to work for DEC LN03 laser printer (as well
	as for LA100f w/ greek/math character rom), except the square root
	'macro?'. If I print the same escape sequence (via C program), it
	creates a beautiful square root. Assuming strings in parens represent
	one octal code, or one character, I use a line similar to:
	"/201{char to shift font}{char to go up half line}{bottom of sqr root}
	{char to go back up half line}|{char to go up another half line}{the
	top char of sqr root}{char to go back down half line}{char to go back
	to default font}",
	
	For the LA100f output goes through a filter, for LN03, it goes right to 
	the printer. Obviously neqn/nroff must split the sqr root symbols up 
	into several categories. Characters appearing once before a repeatable 
	character, the repeatable character, and characters appearing once after
	the repeatable character. There is obviously some format neqn/nroff is 
	looking for, assuming it ever worked. Can anyone help? I have older
	source for nroff, but couldn't find mention of sqrt, or similar. The
	root en 'macro?' has a similar problem, but only two characters.

	 
> not having source to regenerate the file, he hacked it using adb ...

  Is there a readable guide for adb, and can it be used gainfully by
  mere mortals ? :-)

					Thanks for anything,
							    Mike Finegan
							    Univ. of Cinti.
						 ...!hal!uccba!ucece1!finegan