Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from rec.arts.ascii, started 31 May 1995.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
Question: Formatted output to ascii files?

Question: Formatted output to ascii files?

rec.arts.ascii · 3 messages · 31 May 1995 - 15 Jun 1995
  I'm intersted in some software         The trick is, I don't want to 
 that would make it easy to 'pour'       output to paper at all; this 
 text into shapes, and do double         would be for internet traffic 
 columns.                                (usenet and email) *only*

                      Being a computer novice, I'm
                      not very familiar with what's
                      available. There's got to be
                      something that's not overloaded
                      with features, yet will make it
                      easier to create a post like this(?)

Am I dreaming, or what?
 

In article <3qj6b7$r0...@miso.wwa.com>,
Dianne Duncan <dia...@news.seattleu.edu> wrote:
>
>  I'm intersted in some software         The trick is, I don't want to 
> that would make it easy to 'pour'       output to paper at all; this 
> text into shapes, and do double         would be for internet traffic 
> columns.                                (usenet and email) *only*
>
>                      Being a computer novice, I'm
>                      not very familiar with what's
>                      available. There's got to be
>                      something that's not overloaded
>                      with features, yet will make it
>                      easier to create a post like this(?)
>
>Am I dreaming, or what?
> 
>

I couldn't agree more.  Maybe some  lisp  code  which  could be used  with
text-mode in emacs. I have for some time been  thinking a tool which would
fill in extra  spaces to make  straight  margins (like this text) would be
cool. I myself don't know enough lisp, but this group has prodused similar
things before.

-- 
Warning: .signature files should be no longer than 4 lines.
(Only 4 lines of your .signature were posted.)                    ___MMM___
AARRRGGGHHH.....I hate this :-)  (snipit from my newsreader)        (0-0)
e-mail:  nod...@kari.fm.unit.no -------------------------------oOO--(_)--OOo--

On Wednesday, May 31, 1995 at 20:49:27 -0500 (1:49am Thu Jun 1 GMT ?),
  dia...@news.seattleu.edu (Dianne Duncan) wrote:
 
 DD>  I'm interested in some software         The trick is, I don't want to 
 DD>  that would make it easy to 'pour'       output to paper at all; this 
 DD>  text into shapes, and do double         would be for internet traffic 
 DD>  columns.                                (usenet and email) *only*
 DD> 
 DD>                       Being a computer novice, I'm
 DD>                       not very familiar with what's
 DD>                       available. There's got to be
 DD>                       something that's not overloaded
 DD>                       with features, yet will make it
 DD>                       easier to create a post like this(?)
 DD> 
 DD> Am I dreaming, or what?
 
 
     No, you are not dreaming.  This can be done under an operating system
such as UNIX by using lexical tools such as AWK and PERL.  I will leave it
up to another programmer to post the AWK or PERL "line merge" program.  I
use a simple "quick-and-dirty" method for two-column output by combining
UNIX "PR" -- a program that prints in multiple columns -- and UNIX "NROFF"
-- a simple text-processor of the WordStar(tm) variety.  (See the end of
this article for suggestions on how to get EMACS to do the same thing.)
The example follows.  First let us deal with the two paragraphs you wish
to place in double columns:

      = = = = =
     I'm interested in some software that would make it easy to 'pour'
     text into shapes, and do double columns.

     The trick is, I don't want to output to paper at all; this would
     be for internet traffic (usenet and email) *only*
      = = = = =
 
You would place the text in "NROFF -ME" format (i.e. NROFF using the "-ME"
macro package, first with a "dot command" to adjust the column "flush left"
with a "ragged right" border and then using the built-in "dot command" for
two columns, starting each new paragraph with a line space, thusly:

      = = = = =
     .ad l
     .2c
     I'm interested in some software that would make it easy to 'pour'
     text into shapes, and do double columns.
     .sp
     The trick is, I don't want to output to paper at all; this would
     be for internet traffic (usenet and email) *only*
      = = = = =
 
Take this file and run "NROFF -ME" on it, diverting standard output into a
file.  This will create a file of the following single column of formatted
text:
 
      = = = = =
     I'm interested in some
     software that would make it
     easy to 'pour' text into
     shapes, and do double
     columns.

     The trick is, I don't want
     to output to paper at all;
     this would be for internet
     traffic (usenet and email)
     *only*
      = = = = =
 
Now, take the column of text and send it to "PR", specifying the number of
columns of output and the number of lines in the text, diverting the output
into an output capture file.  (You might have to adjust the line figure so
as not to count blank lines.)  For example, the command:

  pr -2 -l10 infile >outfile
 
  ...would create the following double column:
 
      = = = = =
     I'm interested in some                 The trick is, I don't want
     software that would make it            to output to paper at all;
     easy to 'pour' text into               this would be for internet
     shapes, and do double	            traffic (usenet and email)
     columns.	                            *only*
      = = = = =
 
The major work is now done.  The next step is to surround the double column
as an NROFF -ME "unformatted list" in order to protect it from formatting.
The column of text that you wish to have centered is defined as a "flush
left block" of text that has "centering" turned on.  The whole NROFF -ME
page would look like the following:

      = = = = =
     .ll 80
     .(l
     I'm interested in some                 The trick is, I don't want
     software that would make it            to output to paper at all;
     easy to 'pour' text into               this would be for internet
     shapes, and do double                  traffic (usenet and email)
     columns.                               *only*
     .)l
     .(b L
     .(c
     Being a computer novice, I'm
     not very familiar with what's
     available. There's got to be
     something that's not overloaded
     with features, yet will make it
     easier to create a post like this(?)
     .)c
     .)b
     Am I dreaming, or what?
      = = = = = 
 
The output of this "NROFF -ME infile" command would look like:

 = = = = =
    I'm interested in some              The trick is, I don't want
    software that would make it         to output to paper at all;
    easy to 'pour' text into            this would be for internet
    shapes, and do double               traffic (usenet and email)
    columns.                            *only*


                      Being a computer novice, I'm
                      not very familiar with what's
                      available. There's got to be
                      something that's not overloaded
                      with features, yet will make it
                      easier to create a post like this(?)

Am I dreaming, or what?
 = = = = =
 
 
Anyhow, that is how to do what you ask by using NROFF.  You could do the
same thing in EMACS by first creating a single column of text by setting up
the line length boundaries and then "auto-filling" a paragraph at a time.
Once you have the text column, you would then do the "page layout" by placing
the editor into "picture mode" and using the "cut-rectangular-region"
command to pick up a column of text and then "Paste-rectangular-region" to
drop the text column at its location.  It is a bit hard to explain over the
network, but the approach is the same.  First you build a single column of
text, then you place the columns.  It isn't all that difficult.  If you
need instructions for pasting up columns under EMACS, just give a holler on
the network.  Have Fun!
 

About this thread. These messages were posted publicly to the newsgroup rec.arts.ascii in 1995 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post