home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1996
/
ARCHIVE_96.iso
/
discs
/
mag_discs
/
volume_5
/
issue_09
/
pd_ov
/
README
< prev
Wrap
Text File
|
1992-04-14
|
5KB
|
101 lines
TRANSFER OF SIMPLE TEXT FILES FROM PIPEDREAM TO OVATION
by A W Kitchenside
Keywords:
Text-transfer Ovation Kitchenside
Summary
A BASIC program is described which processes a simple text file saved
from PipeDream in Paragraph, ASCII or Tab format to remove single line
terminator characters inserted by PipeDream at word wrap to facilitate
reformatting when the file is transferred to Ovation.
Although there is a facility in Ovation, ie. holding down Ctrl whilst
dragging the file into the Ovation window, which converts single
terminators into spaces and doubles into single, it is still necessary
to delete the extra spaces to obtain correct formatting. This program
avoids that problem.
The Problem
If you have created some text in PipeDream using a single column, ie.
no Tabs, and you want to load it into Ovation, (and perhaps some other
DTP application, I have only tested this with Ovation and, where
the problem does not arise, with Acorn DTP) , there is a problem with
the line terminators if reformatting is necessary. The action of word
wrap is to insert a line feed character at the end of each line in the
text string. If you wish to retain the paragraph layout then it is
necessary to delete the single line feed characters but not the double
line feeds which correspond to heading or paragraph endings.
Page 104 of the PipeDream 4 Reference Manual advises that files for
transfer to DTP programs should be saved in "Paragraph" format.
However, if you do this, or if you save your file in ASCII format,
you will find that single line feed characters are inserted by
PipeDream at the end of each line within a paragraph when word wrap
occurs and these need to be removed for correct formatting in Ovation
if you want to change the length of the lines. This is probably true
in other DTP programs and of ASCII files generated by other Word
Processors, but I have not checked this except for Acorn DTP which
does not have this problem. I am assuming that you are using an extra
blank line between paragraphs as in this file, in which case you need
to retain the case of two consecutive line feeds. In PipeDream 3 you
should save the file in Tab format with a LF separator to get the same
type of output file.
I could not find a way in Ovation of eliminating the single
characters automatically. Search and Replace can be used, but each
occurrence of the line feed character has to be checked to ensure
that it is the end of a line caused by wrap and not the end of a
heading or paragraph. Using the method recommended in the Ovation
Manual. viz. holding down Ctrl whilst dragging the icon of the file to
the Ovation text frame, replaces all single terminators by a space and
the double terminators by a single. This does not help because you
still have to identify and delete the substituted spaces and add spaces
if you want a blank line between paragraphs etc. to obtain the
formatting required.
I, therefore, decided to write a program in Basic to process a file
from PipeDream saved in ASCII, Paragraph or Tab format to remove all
single occurrences of the line feed character and to save the
processed file under a used supplied name. This saves time and trouble
if the file is a long one. There will still be a problem if "Tab" has
been used in the PipeDream file since these will still be present and
in the wrong places so that text in the columns will be mixed, I have
not found a way around this problem. However, if you are using single
column text entry and also if it is your style to indent the first line
of a paragraph by spaces then this program will help you.
The Program PDtoOV
The program is written as a series of Procedures and the REM
statements in each procedure's definition state their purpose. The
real work is done by PROCrem which looks at the input file and
eliminates the line feed character which is stored as &0A. If you
are using a different line separator then you can change the &0A in
PROCrem to the appropriate ASCII code, eg. &0D for carriage return.
Using the Program
Save the files [!Palette] and [PDtoOV] on a disc in the root directory
and, in the same directory, save your PipeDream file in ASCII,
Paragraph or Tab format noting its size.
Double click select on the icon for the program PDtoOV to run the
program and you will be asked for the name of the PipeDream file, its
size in Kbytes, err on the large side, and the name of the file for
output when processed. The program saves the processed file in the
root directory and tells you when this has been done. Follow the
instructions to exit BASIC. You can then transfer your processed file
to your Ovation work directory.
The Directory PD/OV
The program and !Palette are in this directory together with
example files, [PtoOtest] is an ASCII file from PipeDream 4,
[Ovtest] is the processed file and [OvDoc] is an Ovation document
with two columns, the left hand contains the processed file [Ovtest]
whilst the right hand contains the original ASCII file [PtoOtest] for
comparison.