Re: suppressing special output from troff -Tascii

1997-11-24 Thread Martin Bialasinski


On Mon, 24 Nov 1997, Dale Scheetz wrote:

> Is there a way to get troff to not do these formatting steps? As an
> alternative how can I get sed or some other text manipulator to take
> the three character sequence  into
> simply ?
> 
perl -pie "s/X\cHX/X/g"

will replace X followed by C-H followed by X with X.

Better you try it on a copy first. I don't trust myself that much :-)

Maybe you want the enhanced version perl -pie "s/(\w)\cH\1/$1/g"
Will change "a word character followed by C-H followed by the privious
word" to the word character found.

A^HA will be changed to A. A^HB won't be changed.

A word character is defined as [a-zA-Z_0-9] 

Ciao,
Martin


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . Trouble? 
e-mail to [EMAIL PROTECTED] .


Re: suppressing special output from troff -Tascii

1997-11-24 Thread Benoit Goudreault-Emond
-BEGIN PGP SIGNED MESSAGE-

> I am trying to transfer some troff files to straight ascii, but I keep
> getting intermixed control characters and extra characters in its attempt
> to deal with bold, underscore, and other format issues.
> Is there a way to get troff to not do these formatting steps? As an
> alternative how can I get sed or some other text manipulator to take
> the three character sequence  into
> simply ?

As far as I can tell, the following will do it.

 sed -e 's/.'$'\b''//g' < troff-file > ascii-file

where troff-file is your troff-formatted file, and ascii-file is where
you want to put the plain ascii output.  The ugly $'\b' in the middle
is a way to tell bash you want a backspace character passed.  If you
don't use bash, you'll have to take a peek at your shell's manual.

I tried it with a few manpages, looks good.

- -- 
Benoit Goudreault-Emond
Reply to: [EMAIL PROTECTED]
PGP public key fingerprint: 11 43 A9 04 7C 11 41 44  5F FC 69 B1 B6 0A ED 78
E-mail me to receive the actual public key.
-BEGIN PGP SIGNATURE-
Version: 2.6.3i
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNHoE8Vqhoy6gYXzFAQGcNQP+PMu/awUzaL7DQcfyBsd1vMI3W4mrSyxP
armNSzFXo7+ylralxZY8vUQZ4jc6322Ic3GzAuBKdP8HefzLPA1JQyHYBhI2Owl0
wThOjBNabONdJvnJqCJG5lVpG+kuUtBgoMm9+qTaXFQEXxocdTZH2XuUXHithR7g
uwFnxYNNva0=
=Sf7M
-END PGP SIGNATURE-


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: suppressing special output from troff -Tascii

1997-11-24 Thread Dale Scheetz
On Mon, 24 Nov 1997, Bruce Perens wrote:

> Run "col".
> 
Thanks! That was exactly what I needed!

Dwarf
-- 
_-_-_-_-_-_-  _-_-_-_-_-_-_-

aka   Dale Scheetz   Phone:   1 (904) 656-9769
  Flexible Software  11000 McCrackin Road
  e-mail:  [EMAIL PROTECTED] Tallahassee, FL  32308

_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: suppressing special output from troff -Tascii

1997-11-24 Thread Bruce Perens
Run "col".

Bruce
-- 
Can you get your operating system fixed when you need it?
Linux - the supportable operating system. http://www.debian.org/support.html
Bruce Perens K6BP   [EMAIL PROTECTED]   NEW PHONE NUMBER: 510-620-3502


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .