PARALINER - a text formatting utility for typesetters, Amiga version 1.014 This little utility was written to sort out an incompatibility between typesetting programs - particularly on PC and Mac platforms - and normal ASCII text. The problem comes because most ASCII text editors and viewers expect lines to be formatted to a particular width, with periodic end of line characters to tell the displaying or printing device when to start a new line. These characters keep the display neat and help to ensure that lines of text fit the space available, without wrapping untidily or vanishing at the margin, but they're the bane of typesetters because they cause extra new lines to appear in the middle of paragraphs, messing up the format and requiring the sub-editor to scan through and eliminate the spurious and invisible characters manually, a tiresome and problematic task which often shows up hidden hiccups when text is reformatted. The problem stems from publishing software that creates a new paragraph for each new line. We still need some way of signalling a real paragraph break, as few articles are intended to occupy one paragraph from start to end, so this utility leaves in an end of line marker if it appears as part of a completely blank line. Other end of line markers are replaced with a space, so that words are not merged from one line end to the next start. It follows that headings, captions and tabular information should have a blank line before and after each line, or successive unseparated lines will be collected together into one paragraph. This makes a real mess of tables! Sometimes you may need to eliminate multiple (e.g. paired) spaces from the resultant file, if your text output program does not trim spaces from the end of formatted lines. This can easily be done by searching and replacing pairs of spaces with single spaces, over and over again till no more pairs are found. This can mess up table formatting but it's no loss as monospaced tables must always be reformatted before setting in a proportional font. I first came across this problem in about 1988, and wrote a little Qdos SuperBASIC program to convert plain text for Helen Armstrong, the editor of Sinclair QL World magazine. This Amiga version for AUI does essentially the same job but is about 30 times the size, partly because it's a stand- alone compiled task, and partly because it's relatively friendly, with a a windowing interface, ASL file requesters for input and output, and a progress indicator. This version was written for AUI Editor David Ward, when he asked me to format copy for publication with lines 'as wide as possible' and I realised that the Qdos tool deserved an Amiga counterpart. USAGE From the Shell or CLI, type the command name followed by the name of the input and output files. If the output file already exists it will be overwritten. If you supply only a question mark as a parameter, a moderately helpful message will appear: PARALINER is a file utility that converts formatted ASCII text files into long lines of one line per paragraph suitable for processing in Apple Macintosh word-processors and DTP applications. This expects its input files to have one completely blank line after each paragraph or cross-heading to mark the start of an output line. Example: PARALINER InFile OutFile If the output file name is not supplied the input file name is extended with the suffix .PARA (replacing .TEXT if present) to make a new output file name. The separator TO may optionally be between the two file names, with an arbitrary number of spaces on either side. PARALINER goes faster if you do not both read from and write to the same drive, as that causes a lot of seeking back and forth as lines are copied from the old to the new file. If you do not specify any file name, or start PARALINER by clicking on its workbench icon, windows will appear telling you what the program is for and asking you to nominate files in the usual way, one at a time. Close the input file requester to Quit. COMPATIBILITY PARALINER is compatible with all known versions of AmigaDOS but you need the ASL library to use the workbench-friendly menus; this has been part of the Amiga System since Workbench 2, and is available as an add-on for older systems. I only tested it from the Command Line on Workbench 1.3. You should expect a library error if you try to use it with no parameters on such a vintage system, as it will be unable to open the ASL library. PARALINER has been successfully tested on Amiga 500 and A4000 systems with Workbench versions from 1.3 (Kickstart 34) to 3.1 (Kickstart 40). DISPLAY FORMAT The graphical user interface is set up for a HiRes screen at least 640 pixels wide and 200 pixels tall (the minimum for an NTSC display). You can stretch the file requesters in the usual way to see more names or other file details. The program tries to open the helvetica 15 font, which is part of the standard Amiga Fonts distribution. If this cannot be found, a message appears and you are asked to press a key or tap the left mouse button to continue, using the default workbench font set on your machine. If your window title font is more than 12 pixels tall, or your workbench font is more than seven pixels wide, on average, the initial text may overlap the progress indicator or the edge of the window. This is only a problem on a minimal NTSC display. The window and requester adjust to use extra lines on the workbench if they are available. LINE TERMINATION The Newline character has ASCII code 10 on Amiga, Qdos and Unix, 13 on ST, and BOTH on MSDOS, old printers, and other belt-and-braces systems. This program follows the Amiga convention, since it runs on an Amiga. There are lots of programs on Aminet which convert line-ends between the various conventions. My personal favourite is CRLF by Frank Swift. You can do the same job by loading the file into many Amiga text editors and saving it back out; the line ends are generally converted automatically. DISTRIBUTION & UPDATES I welcome suggestions for further enhancements and corrections for this program. Next on the update list is trimming of spaces from around the input lines, simple interactive input even in the absence of ASL.LIBRARY, and a totally font-adaptive display. This program may be freely distributed, as long as this text is included and both text and program are unmodified. 1996 copyright remains with the author Simon N Goodwin of Silicon Studio Ltd, Registered Amiga Developers.