[comp.text] Esc and Nroff

funk@osiris.cso.uiuc.edu (Bruce Funk) (05/19/91)

I need to imbed some Printer control Escape sequences  in  my nroff source,
but  the formatter keeps eating the Esc character.  Have tried  
\ escaping  it to several  levels, but it keeps disappearing as soon as
nroff gets it.

I have gone  so far as to  to try faking out  a (hopefully ) unused
character and / or printer action in nterm/tab.whatever, but either 
I  get an extra space (action) or   or extra characters (character 
redefinition).

TFM is no help.  Have gone thru _Unix Text Processing_ (Dougherty and O'Reilly)
but no help.

Any help greatly appreciated.
please mail to the zweibrucken-emh1 address
-------------------------------------------------------------------------------
|        Bruce Funk                         INTERNET: funk@osiris.cso.uiuc.edu |
|Chief, *IX Support Team     __________________funkb@zweibrucken-emh1.army.mil |
|USAISEC-EUR                 |                                                 |
|Zweibruecken, W. Germany    | Any resemblance between me and reality          |
|(guesting on osiris)        | is strictly coincidental                        |
-------------------------------------------------------------------------------

funk@osiris.cso.uiuc.edu (Bruce Funk) (05/22/91)

I wrote:
>I need to imbed some Printer control Escape sequences  in  my nroff source,
>but  the formatter keeps eating the Esc character.  

From  several of the replies, I 'm getting the idea that my nroff may be
somewhat unique (flawed??) in eating the Esc character.

Many solutions, including fake characters that are later sed'd into Esc,
but a tip of the hat to Dan Berry for pointing out that ditroff derived
nroff's will accept \N'x' to generate the xth character of the current font. 
Thus \N'27' solved my problem
-Bruce_

jaap@mtxinu.COM (Jaap Akkerhuis) (05/23/91)

In article <1991May22.131730.19938@ux1.cso.uiuc.edu> funk@osiris.cso.uiuc.edu (Bruce Funk) writes:
 > I wrote:
 > >I need to imbed some Printer control Escape sequences  in  my nroff source,
 > >but  the formatter keeps eating the Esc character.  
 > 
 > From  several of the replies, I 'm getting the idea that my nroff may be
 > somewhat unique (flawed??) in eating the Esc character.

All troffs/nroffs eat escape characters. It is even mentioned in the
menual.

 > 
 > Many solutions, including fake characters that are later sed'd into Esc,
 > but a tip of the hat to Dan Berry for pointing out that ditroff derived
 > nroff's will accept \N'x' to generate the xth character of the current font. 
 > Thus \N'27' solved my problem

Although this might work in modern versions of n/troff, the proper way
to deal with Printer control Escape sequences is in the appropriate
``terminal description files''.

	jaap

brown@vidiot.UUCP (Vidiot) (05/23/91)

In article <1991May22.131730.19938@ux1.cso.uiuc.edu> funk@osiris.cso.uiuc.edu (Bruce Funk) writes:
<I wrote:
<>I need to imbed some Printer control Escape sequences  in  my nroff source,
<>but  the formatter keeps eating the Esc character.  
<
<From  several of the replies, I 'm getting the idea that my nroff may be
<somewhat unique (flawed??) in eating the Esc character.
<
<Many solutions, including fake characters that are later sed'd into Esc,
<but a tip of the hat to Dan Berry for pointing out that ditroff derived
<nroff's will accept \N'x' to generate the xth character of the current font. 
<Thus \N'27' solved my problem

A point should be mentioned here.  It is not a good idea to imbed printer
control functions into nroff source.  Controlling the printer directly can
get it out-of-sync with the nroff program.  The computer program may think
that the printer is doing one thing, while you have the printer doing another.

It is better to fix up the nroff driver tables to have the functions that
the printer can do, instead of doing them directly.

Just a point to keep in mind.
-- 
      harvard\     att!nicmad\          spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INTERNET:vidiot!brown%astroatc@spool.cs.wisc.edu