[comp.text] Control Characters in nroff

artp@motbos.UUCP (03/04/87)

Does anyone out there have experience in embedding non-printing ASCII characters
in an nroff file ?  For example, the NEC Laser Printers use an ASCII FS (Form
Separator) character to control various font / print modes.  I have had no
problems embedding an ASCII ESC (Escape), but the FS is stripped out.

I have tried using translations (.tr), escape character redefinition (.ec),
multiple backslashes, \&, etc. All result in the FS being stripped out of
the output stream.
-- 

Regards,
Art
-------------------------------- 

<< Unusual Disclaimer >>

Art Parmet - AEM @ Motorola Semiconductor, Woburn, Ma.
UUCP: {hplabs!motsj1, mot!motsj1} {cdx39, motsj1, mottom,
oakhill, mnetor, motatl, motdc1, motrhr, motwdc, mcsbos,
mothup, motham, honcsp, motcso}....motbos!artp

Voice:      +1 617-932-9700
UUCP:       +1 617-932-9191
Fax:        +1 617-932-9100

bamford@ihlpg.UUCP (03/05/87)

In article <206@motbos.UUCP>, artp@motbos.UUCP ( AEM) writes:
> Does anyone out there have experience in embedding non-printing ASCII
> characters in an nroff file ? 

A line beginning with \! is usually output without any translation. 
Unfortunately, this includes the new-line character.  It sure would be
nice to have a more general solution.

-- 
				Harold Bamford
				AT&T Bell Labs
				IE 2F-524 (312) 416-7397

artp@motbos.UUCP ( AEM) (03/08/87)

> In article <206@motbos.UUCP>, artp@motbos.UUCP ( AEM) writes:
> > Does anyone out there have experience in embedding non-printing ASCII
> > characters in an nroff file ? 
> 
> In article <2995@ihlpg.ATT.COM>, Harold Bamford writes:
> A line beginning with \! is usually output without any translation. 
> Unfortunately, this includes the new-line character.  It sure would be
> nice to have a more general solution.
> 
With our System V.2 /020 based system, the \! escape STILL passes the output
through the terminal model, and filters out FS characters.  Your are correct
also, relative to the new-line character being appended in this mode.  Unfor-
tunately, a newline character terminates many printer escape sequences (like
bold and shadow mode).

In an email response, Jay Brett (unm-la!jay) writes:
>I'm surprised that you can embed the escape char (my nroff won't pass it).
>>From section 10 of the Nroff/Troff User's Manual: "... horizontal tab ...
>backspace ... newline ... In addition, STX, ETX, ENQ, ACK, and BEL are
>accepted, and may be used as delimiters or translated into a graphic with
>tr.  _All_ others are ignored."  Ignored means they are skipped while
>reading the input as though they didn't exist.
>
>You can get control chars in your nroff output, though.  What you need
>to do is learn how to generate terminal description files (as found in
>/usr/lib/term).  There are certain "capabilities" for which you can
>define a sequence of characters (bold-face, for example).  For other
>things, you can chose a special character name ( eg, \(xx ), which you
>won't otherwise use in your input.  Make up a description file for a
>phony terminal, and assign to that character the string of characters
>you want to appear in your output.  Then simply use the special char
>in your input file to cause your defined string to appear in the output.
>
>Somebody fairly recently posted a how-to article on creating terminal
>descriptions.

Does anyone out there remember what newsgroup this was posted to ?
-- 

Regards,
Art
-------------------------------- 

<< Unusual Disclaimer >>

Art Parmet - AEM @ Motorola Semiconductor, Woburn, Ma.
UUCP: {hplabs!motsj1, mot!motsj1} {cdx39, motsj1, mottom,
oakhill, mnetor, motatl, motdc1, motrhr, motwdc, mcsbos,
mothup, motham, honcsp, motcso}....motbos!artp

Voice:      +1 617-932-9700
UUCP:       +1 617-932-9191
Fax:        +1 617-932-9100