FANFOLD: A CP/M TURBOPASCAL TEXT COMPACTING/FORMATTING/PRINTING UTILITY VERSION 21.0r Copyright: January 29, 1990 Ron Rock,Sr. and Ron Rock,Jr. Chicago,IL Issued as SupportWare with Public Domain Distribution; No Warranty of any type is Expressed or Implied. TurboPascal (tm) is Borland International's v.3.0. This program is full featured as I personally dislike the disabled shareware concept. However, because of the amount of time involved, I am no longer able to respond to inquiries from non-registered users. If you find this program useful and wish to become a registered user of FANFOLD, send your name, address and a donation of $15.00 (U.S.) by check or money order to: [S] Ron Rock 316 N. Michigan Ave. #400 Chicago, IL 60601 [E] A registered user will receive a registration #, notification of significant updates, consideration of suggestions for new features (or customization), and direct mail and/or phone support. MAY BE INSTALLED FOR ANY CP/M Z80 OPERATING SYSTEM WITH A FREE TPA ADDRESS OF AT LEAST D180h. If your TPA is insufficient you will be told that you are "OUT OF MEMORY" and the program will be aborted. See INSTALLATION below. `Why use FANFOLD ? ` The reason for FANFOLD is a personal one, perhaps widely shared, that many formatted text files are simply too long. While a .DOC file may look very nice, I cringe at the first "dot" command or expanse of empty space on-screen, especially when the file is 40 or 60k. Depending on how many formfeeds are embedded in the text, a printout may take 20 to 40 sheets which then must be handled, stored, and flipped through when needed. After using a word processor several times to clean up the text before printing a hard copy, FANFOLD emerged. By printing on both sides of fanfold paper you can save at least 50% of all of the above. Ridding the text of most of the "Formatting Fluff" saves even more and choosing the 2 column mode may save another 50%. Various lists, catalogs and BBS messages are also prime candidates for "compaction". In fact, I run FANFOLD even on files I will only read from disk. I can quickly set the format as I wish and eliminate print commands by viewing the .FAN file. Finally, I save about 75% on my paper costs. As I recall, a recent example is EPEX11.MAN by James H. Whorton. Nice program, nice doc; but it printed out on some 51 pages. After FANFOLD: 5 sheets; more than 1500 blank lines eliminated; with only a small fraction of the total printing time needed. (If you want to replicate, set FANFOLD to NOT change linelength; delete whitespace; 2 column mode; 88 lines/page and two sided output: 1779 lines will be processed; 1588 blank lines will be eliminated.) A 90% saving of paper! [S] FANFLD21.LBR CONTAINS THE FOLLOWING FILES: The files with a "Z" in the extent are "CRUNCHED" and must be "un-CRUNCHED" before use. FANFLD21.DZC DOCUMENTATION FANFLD21.UPD UPDATE NOTES FANFLD21.COM The program FANINS21.CHN for installation of Printer/Defaults FANTRM21.COM for installation of Terminals FANTRM21.DTA for installation of Terminals FANTRM21.MSG for installation of Terminals [E] See INSTALLATION below. ----------------- `What is FANFOLD ? ` FANFOLD is a "What You See Is What You Get" text file utility to compact and reformat a text file including printing on both sides of fanfold paper. The Source Text may be either standard ASCII text files or WordStar/NewWord type document text with embedded soft spaces, hyphens, and carriage returns. The user has full menu control of the output format. You may take any Source File text and: [S] * lengthen, shorten, fill, and justify Text lines; * carry to new line or truncate "as is" lines; * save to disk file and/or send to printer; with * one or two sided printout on fanfold or regular paper; * normal or two column printout with variable column #2 start location; * delete excess whitespace; toggled, left edge, or all; * 10/12/17/20 characters per inch; * 1 to 66/88/99 lines per page; * number of blank lines at top/bottom of page; * header line on odd pages; * page number placement; top, bottom, corners; * hole-punching offset on odd pages only; * left margin on all pages; * pre-View output; * create a Table of Contents; * and redirect output to another drive/user. [E] Internal checks and /or default settings are provided to assure that the final printout is compatible with the printer, i.e. printing linelength of less than 136 characters at 17 chars per inch, etc., etc. At first, FANFOLD may seem very complicated because of the many options available. However, the options are just that --options-- to be used or not as the spirit dictates. Try various combinations and V>iew to see the results. No change is made to the Source File. FANFOLD creates new files as needed. You may exit FANFOLD at any "Yes,No,Exit" prompt by entering "E". You may stop scrolling by entering a control-S (^S) during a V>iew and start again with any keypress. A control-S followed by a control-C may also halt FANFOLD. NOTE: At times FANFOLD will appear to pause for varying periods of time without displaying any screen prompt. During such times, FANFOLD is filling its buffers and performing other tasks within the buffers. The length of the pause is dependent upon the task and the speed of the hardware and medium used for the drives. RAM DISK is shortest, next HARD DISK and finally FLOPPY SSSD's. If NOTHING has occurred for say, 30 sec., during an expected READ or WRITE to a file or the screen, FANFOLD may have hung-up. Check for corrupted files. A WILL ENTER THE INDICATED DEFAULT SETTING AND PROCEED TO THE NEXT ITEM IN THE MENU. AN WILL ENTER ALL OR REMAINING DEFAULT VALUES IN THE "PRE-FORMAT" MENU. (Exception: The R>un command in the Format Menu is displayed but "R" MUST be entered to Run.) You may alter the default settings: see INSTALLATION below. `Getting started ` Enter "FANFLD21" or "[du:]FANFLD21 [du:source.ext]" - and follow the screen prompts. You should not need to read this documentation except to install FANFOLD for your computer. (Oh sure! Only if I wrote the program!) You might want to print this out as your first "attempt". Be sure to have a backup original of everything - "Just in case!" See INSTALLATION below. An example of the Pre-Format Menu for the file FANFLD21.DOC is as follows: ( Questions are asked in sequence. User entry follows the ":" or ">" N.B. The actual file size, etc. may vary from this example.) [S] The screen prompts are presented sequentially in the PRE-FORMAT MENU. ----Top of Screen (PRE-FORMAT MENU)--------- GEMINI 10X/FANFOLD v21.0b Copyright 1/29/90 Ron Rock Sr/Jr Chicago, Il ---------------------------------------------------------------------- Source Filename: E0:FANFLD21.DOC Write output to another Drive-User (DU:) [Y/N/Exit] ? > Y Drive letter [A-P] > E User # [0-15] > 15 Output to Drive-User: E15:- Ok [Y/N/Exit] ? > Y WS/NW type file [Y/N/Exit] ? > N Reformat for new Maximum Linelength [Y/N/Exit] ? > Y Text between "[S]" and "[E]" is unaltered, otherwise: (Width:Linelength) 78:160; 66:136; 46:96 ; 38:80; w/o Margin & Offset Gives minimum column separation of 2 . Max Linelength [1-160] > 78 Truncate "unaltered" to the maximum linelength of 78 [Y/N/Exit] ? > N Delete whitespace [Y/N/Exit] ? > Y Carryover to new line [Y/N/Exit] ? > N Fill [Y/N/Exit] ? > Y Justify [Y/N/Exit] ? > N All Flush Left [Y/N/Exit] ? > N View results [Y/N/Exit] ? > Y Everything Ok [Y/N/Exit] ? > Y ----- Bottom of screen ------ [E] And now to step through the Pre-Format Menu... `Source File Name: ` Enter the name of the file you wish to FANFOLD if you did not enter it as a CP/M command parameter. EXAMPLE> Source File Name: A0:FANFLD21.DOC While processing a SOURCE FILE, FANFOLD creates and names files with the filename of the SOURCE FILE plus EXTENTS of FAN, ODD, EVE and NDX. These extents must be considered as reserved for FANFOLD. With the exception of .FAN files (as explained below) FANFOLD will abort with "INVALID" if a source file name with an extent of ODD, EVE, or NDX is entered. Rename the source file extent. FANFOLD will ask a number of pre-formatting questions in order to create the intermediate file, ".FAN", which is then used as the "draft" for the Format Menu. The first line of a .FAN file contains the the original filename, the total number of lines, the pre-format linelength ,the longest linelength (see the "as is" toggle below) retained, and the number of blank lines eliminated. The format is: source filename=<# lines>/$* ie."FANFLD21.DOC=423/78$78*0". When you E>xit from the FORMAT MENU ( not this Pre-Format Menu), the .FAN file is saved and closed and the empty ..ODD,.EVE,.NDX files are erased. If you wish, the .FAN file then may be edited, index markers added or other changes made. The Format Menu will use the original parameters for calculations but will process the changed text in full. FANFOLD recognizes that a source file name with the reserved extent ".FAN" has been "cleaned up" and pre-formatted by FANFOLD and is prepared for final formatting. When ".FAN" is entered as the Source File, FANFOLD seeks the information contained in the first line and goes directly to the formatting menu, saving the cleanup/counting time. Entering an will enter the remaining default values in the Pre-Format Menu. You may redirect the output (.ODD,.EVE,.NDX files) to another DU:. `Write output to another Drive-User (DU:) [Y/N/Exit] ? > Y` Drive letter [A-P] > E User # [0-15] > 15 Output to Drive-User: E15:- Ok [Y/N/Exit] ? > Y Default = "N". If "E" is entered you will be returned to CP/M whenever the prompt is in the form ...... [Y/N/Exit] ? >. Open files are closed and retained in this Pre-Format Menu. You may write the output to another drive by answering "Y". The default "N" writes to the drive of the Source File. As a rough measure of the free space needed on a drive, double the size of the Source File. If the space on a drive is less than needed, direct the output to a fresh disk on another drive. In some instances, a step by step approach may be needed...ie. Source to .FAN then .FAN to .ODD /.EVE/.NDX. If an error message of "F0" is displayed while running FANFOLD, you have run out of disk space and must begin again after making room for the files. The only limitation on the size of a source file is the available free disk space. You may find it best to pre-format to the .FAN file, exit and/or write to a fresh logged disk for the .ODD,.EVE,.NDX files, ie. "FANFLD21 du:source.FAN. FANFOLD will read the parameters from the .FAN file, permit redirection of the output and go to the Format Menu. `Output to [DU:]- Ok [Y/N/Exit] ?> ` Default = "Y". The Drive-User of the files to be created are displayed. The default is "Y" to continue. If "N" is entered you will be returned to the "Drive" question. If "E" is entered you will be returned to CP/M. `Is FANFLD21.DOC a WS/NW type file [Y/N/Exit] ? > ` Default = "N". FANFOLD will read a text file, either line by line (a standard ASCII text file) or character by character ( a WS/NW-Wordstar(tm) or NewWord(tm) text file ) eliminating any embedded formfeeds, dot commands or strings of carriage returns greater than two. If the fill is a WS/NW type it will strip the set bit and provide hard carriage returns. You must have specified a linelength. The default is "N" since FANFOLD will automatically stop and ask to restart if non-ASCII text lines are encountered. The WS/NW mode is 1/3 slower than the default ASCII mode. `Reformat for new maximum linelength [Y/N/Exit] ? > ` Default = "Y". The "Reformat for new maximum linelength " question has two purposes: first, to set the linelength for two column printing or to be certain the text line will fit; and second, to permit fill and justification of paragraphs. If "N" is entered the Source File lines are unaltered but for formatting purposes, FANFOLD keeps track of the longest line encountered, the number of blank lines eliminated and size of the new file ( with an extent of FAN) in lines. You must select a maximum line length in order to FILL and/or JUSTIFY and/or DELETE WHITESPACE. If you do not want to fill or justify but you do want to delete whitespace set the maximum linelength to 160 (the upper limit of a line in FANFOLD). If the default "Y" is chosen the following will appear: ---------------------------- `Text between "[S]" and "[E]" is unaltered, otherwise:` (Width:Linelength) 78:160; 66:136; 46:96 ; 38:80; w/o Margin & Offset Gives minimum column separation of 2 . Max Linelength [1-160] > 78 ----------------------------- [S] Note the "[S]" immediately above this line and the "[E]" at the end of this paragraph and other places in this .DOC if you have not FANFOLD'ed this file. The open square bracket-uppercase S/E-close square bracket are toggles which must be placed at the leftmost column within the SOURCE FILE to [S]tart and [E]nd the preservation of Source "AS IS". No filling, justification, or deleation of whitespace occurs and the toggles (The "[S]" and "[E]" placed in the source file to invoke the "as is" feature) are not written to the .FAN file. [E] The purpose of the "as is" toggle is to maintain tabular or other formated text portions of a Source file unaltered or "as is", while the remaining text is processed. If 2 column mode is selected in the later Format Menu, "as is" lines which are longer than the selected column width are included in full, UNLESS you select the OPTION to: `Truncate "unaltered" to the maximum linelength of (nn) [Y/N/Exit] ? > Y` This option is provided to insure that a printer which will carry- over any line which exceeds the maximum printable linelength will not destroy the page format. In some cases it is acceptable to "lose a few characters" at the end of a line rather than re-format. The "problem" will usually occur where an "as is" segment in 2 column mode will exceed the printer's capacity, forcing an unexpected and unaccounted for extra line. The default value is "Y" since the result of the "N" may be a disaster in a long file. However, you may wish to try FANFLD with a "N" for your printer. OTHERWISE: in 2 column mode, if column #1 within the [S] & [E] toggles exceeds the start of column #2, a delineator of " | " will be added to the end of the column #1 text to separate it from column #2 text. This provides a means of obtaining "readable" text in 2 column mode when the unformatted text in column #1 is near but not the same as the column #2 position selected. The Format Menu will display the number of chars in the "Longest" line found within the "[S]/[E]" blocks IF greater than the selected maximum linelength. Most users will find that source text which contains many small tabular text segments will print best in 2 column mode. If only occasional tabular text or many long paragraphs are present, selecting a FILLED and/or JUSTIFIED linelength as long as possible is best for conserving paper. However, the two column mode is easier on the eyes. If MAXIMUM LINELENGTH, FILL,JUSTIFY,and DELETE WHITESPACE are not selected, FANFOLD will preserve the source text "as is" with only FORMFEEDS, DOT COMMANDS and multiple 's removed. Two sided printing and other options will still be possible. `Max Linelength [1-160] > 78` The default is set to a linelength of "78" characters. (See installation to change this default.) The longest line which may be set is 160 characters. The user may specify a linelength for the .FAN file either to utilize the 2 column per page mode; assure that the text will print properly at 10,12,17,20 CPI; or set the linelength for FILL and/or JUSTIFY. (Yes, you can cause FANFOLD to crash by selecting a length of "1". The minimum linelength is equal to the longest word in the text.) If the column mode is later selected in the Format Menu, the printer linelength will be automatically adjusted to accommodate the 2 columns with a default column separation of 2 spaces. You may increase/ decrease that value in the Format Menu. If "E" is entered you will be returned to CP/M. A bit of technical information may be helpful. To conserve file size, especially in the 2 columns per page mode, FANFOLD makes maximum use of tabs for formatting. You will be able to set the start of column #2 to any value. The column position will be padded with spaces from the nearest tab. Setting the column #2 position also sets the maximum acceptable text characters per column. In other words, it is not possible to put a line of text of 45 characters into a column of 40 characters. However, if when asked : "Reformat for a new maximum linelength > " a linelength of "38" was entered, no line of text would exceed 38 characters and would fit in the 40 spaces reserved for Column #1. The 2 character difference between the 38 and 40 provides the separation between Column #1 and Column #2. In practice a 2 space separator is a good minimum value. If more than 2 spaces is desired, select a smaller " new maximum linelength " or enter a higher column #2 start position. `Delete whitespace [Y/N/Exit] ? > ` The default is set to "Y" since it is almost always desirable to delete existing source text whitespace, especially with the FILL and JUSTIFY options. HOWEVER: If you do not select the "delete whitespace" option you will be given another option later; "All Flush Left" (see below). `Carryover to new line [Y/N/Exit] ? > ` Having set the Maximum linelength, you may not want the excess characters of any of a "long" line prepended to the next line as in Fill Mode. For example, the text may be a line numbered assembler PRN file and you wish to retain the left edge even on "too long" lines. Selecting the Carryover option will place any excess over the selected maximum linelength to the next line as a new line. The default is "N". If you do not select the Carryover option you will be asked: `Fill [Y/N/Exit] ? > ` `Justify [Y/N/Exit] ? > ` It is possible to have a filled and/or justified line of any length up to 160 characters. To reach this feature you must choose to reformat a linelength and specify the new linelength. The Fill option will append words from the following line to fill-up any "short" line which is not the end of a paragraph. A paragraph is defined as any block of text separated from the next block of text by at least one blank line. The JUSTIFY option will add spaces to any line which is within 16 characters of the selected maximum linelength to provide a uniform right edge of text. The default is "Y". If "E" is entered you will be returned to CP/M. `Flush left only [Y/N/Exit] ? >` Choose this option if the Source file contains a left margin which you wish to eliminate but you wish to preserve the remainder of the line spacing. This option applies even to the "AS IS" text. Useful when the source file contains a left margin which you wish to eliminate. `View results [Y/N/Exit] ? > ` The default is "Y". The pre-formatting output to the .FAN file is displayed on-screen to permit "checking" of the pre-formatting. If a line is greater than 78 characters long, only the first 78 characters are displayed on the CRT to prevent "carryover". Note the timed instruction at the base of the screen to toggle V>iewing off. You must strike a key while the instruction is present to toggle viewing off. If viewing is toggled off during creation of the FAN file, you will be asked if you wish to continue to view the Fan file (it's faster if not Viewed) or re-start by returning to the beginning of the pre-format menu. A or "Y" will continue pre-formatting and show progress without viewing output. `Everything Ok [Y/N/Exit] ? > ` This is your final chance to check that everything shown is correct for the creation (and viewing) of the .FAN file. The default is "Y". If you enter "N" you will be returned to the beginning of the pre-format menu, AFTER the "SourceName" and you may reset any parameters you wish. If "E" is entered you will be returned to CP/M. While writing the intermediate file, .FAN, without viewing, FANFOLD will indicate progress every 100 or so lines processed. Once the .FAN file is written, FANFOLD moves to the `FORMAT MENU` which will look as follows: (The actual values may vary.) [S] --------TOS---- (FORMAT MENU) ------------ GEMINI 10X/FANFOLD v21.0b Copyright 1/29/90 Ron Rock Sr/Jr Chicago, Il ------------------------------------------------------------------------- > 27 blank lines were deleted > Output to E15: File E15:FANFLD21.FAN contains 996 Lines: Pre-formatted= 78 chars; Longest= 79 THE FORMAT FOR THE OUTPUT FILES IS AS FOLLOWS : " FANFLD21.DOC " H>eader : 2 Line Header with the above at Line: 1 F>ooter : 3 Line Footer with Page # in LOWER MIDDLE O>ffset Pun : 0 TAB offset on ODD Pages for hole punching C>olumn Tgl.: Normal text M>argin : 0 space LEFT margin on ALL Pages L>inelength : 80 CHARACTERS per Line [ 10 Chars Per Inch ] P>agelength : 88 LINES/PAGE [ 8 LPI ] FOR : 13 Pages/7 Sheets I>ndex Tgl. : Off V>iew : Scroll 1st 80 columns as formatted E>xit : to CP/M with E15:FANFLD21.FAN Saved ENTER CHAR OF ITEM YOU WISH TO CHANGE OR "R" IF READY TO RUN > R ODD: |< text 1..to..78 >| of |80 EVEN: |< text 1..to..78 >| of |80 | O |= Hole tab : T= 8 sp. tab : m=margin : |.s.|= Col. Separator --------BOS---------- [E] If you are running FANFOLD for the first time or don't recall the effect of the various commands, the best way to learn is to step through them and V>iew the result. You will be guided by screen prompts as needed. Nothing will be written to the .ODD and/or .EVE file until you enter the "R" to run the settings. FANFOLD is designed to only permit or automatically adjust the settings to a consistent whole. NOW, TO STEP THROUGH THE FORMAT MENU DISPLAY ... `> 27 blank lines were deleted > Output to E15:` Tells the number of blank lines eliminated from the Source File as the .FAN file was created. Just makes you feel good if the number is large. Also reminds you of the DU: of the .ODD,.EVE.,.NDX files. `File E15:FANFLD21.FAN contains 996 Lines: Pre-formatted= 78 chars; Longest= 79 ` Information about the .FAN file just created. LONGEST = nn chars refers to the longest line in .FAN which may be greater than the "Pre- formatted = nn", if the "as is" ([S]/[E]) toggles have been inserted in the Source File, "Longest" displays the longest line therein or the Pre-formatted value if that is greater."As Formatted = nn" will give the maximum linelength selected or found if no maximum linelength was set. `" FANFLD21.DOC "` The text between the " "'s displays the contents of the header line. The default is simply the Original Source Filename. If page number placement is set to T>op while setting the F>ooter parameters " Page nn of nn Pages" is automatically appended and displayed. `H>eader : 2 Line Header with the above at Line: 1` Permits the changing of the default header line as displayed in the line above. The number of lines in the header may be set to any value but the placement of the text will always be two lines above the body of the text. While the header may be up to 160 characters long, entry of more than 78 characters will affect screen alignment. The header line text is written only to ODD numbered pages. Page numbers are written to all pages. `F>ooter : 3 Line Footer with Page # in LOWER MIDDLE` Permits selection of the placement of the page # and the number of lines in the footer. If the page number is retained at the page bottom (middle or corners) a blank line then the page number line is written. To assure skipping over the perforation of fanfold paper the number of footer lines may be increased. FANFOLD ends a formatted page with a Formfeed (^L) to align subsequent pages. Recall that FANFOLD has eliminated all formfeeds in .FAN so that pagination will be controlled by you, the user. To prevent, in so far as possible, multiple formfeeds at printing, the body of the text will never be greater than the number of lines per page selected less three. Thus, selecting 0 H>eader lines and 0 F>ooter lines will result in 63 (of 66); 85 (of 88) or 96 (of 99) lines of text per page. If multiple formfeeds are still encountered when printing, increase the number of F>ooter lines. `O>ffset Pun : 0 TAB offset on ODD Pages for hole punching` Permits setting of an offset for hole punching by tabbing text to the right on odd pages. If FANFOLD will not accept an offset, the available space in a line must be increased by increasing L>inelength; decreasing M>argins toggling C>olumn off or (worst case) starting again with a smaller maximum linelength. The bottom line display will assist in making that decision. It will also show a "| O |" to represent the punched hole position. Note that if the C>olumn toggle is set, the O>ffset will relocate the columns IF the selected linelength permits. `C>olumn Tgl.: Normal text` This command is a "toggle" command. Entering a "C" will toggle the command on; entering a "C" once again will return to "Normal Text". Permits choosing to print with two columns of text per page side. It is this option which is referred to in the pre-format menu line above: [S] Column (width:length) 78:160; 66:136; 46:96 ; 38:80; w/o Margin & Offset Gives minimum column separation of 2 . Column Width [1-160] > 78 [E] FANFOLD will automatically calculate a minimal Column #2 position (column length + 2 spaces) and readjust the L>inelength if possible. You may override by entering your own values as desired but FANFOLD will not accept "Bad" values. You may also want to check the P>agelength line to see what affect the C>olumn toggle has on the number of " nn Pages/nn Sheets" calculation. You may toggle back and forth as desired. You may also V>iew at any time or check the bottom line display to assist. Note that FANFOLD wants at least a 2 space column separator, but you may increase or decrease that value. While personal preference is paramount, I usually try to maximize linelength and if the Source File contains few tables to be left "as is" I choose not to use the two column mode. If more than a few portions are left "as is" I use the two column mode. (I find I'm using the 2 column mode almost all the time for printing, and the 78 character linelength for only viewing disk files...at this writing) The effect may be V>iewed and you have the option to view either the right edge or left edge if the formatted linelength is greater than the screen width. A two column page with Column #2 at 80 will appear to be only half there with the left or rightmost 80 characters "hidden". `M>argin : 0 space LEFT margin on ALL Pages` Permits setting a left margin on all pages, though it may be better to set the paper to the left in the printer to provide the margin. Spaces are written to each line which increases the size of the output files. The affect may be V>iewed or seen in the bottom "line display"as "mmmm"s. `L>inelength : 80 CHARACTERS per Line [ 10 Chars Per Inch ]` No default setting; Dynamically determined by Maximum Linelength; O>ffset; C>olumn toggle; and M>argin settings. May be increased to allow greater O>ffsets, M>argins, etc. The "Rule" for dynamic setting is to set to the largest type/smallest linelength which will suffice. The 2 column toggle will automatically re-set the linelength. Remember, setting the linelength sets the character pitch of the printer, which determines the number of characters that can be written to a printed line. The size of the typeface may affect the acceptable number of lines per page. You may want to re-set that value. `P>agelength : 88 LINES/PAGE [ 8 LPI ] FOR : 11 Pages/6 Sheets` Default is 88 lines for printing to an 11 inch sheet. Choices include 66, 88, or 99 lines/page. The number of pages for a setting is calculated and displayed. The number of "Sheets" is based on two-sided printing of text. The printer's type face (as determined by the L>inelength setting, may limit acceptable choices. Thus, 99 lines of 10 cpi type may look too crowded while 99 lines at 17 cpi may be acceptable. You may also choose a "pagelength" of less than 66 lines for card files, etc. You must work out the correct linelength for the various sized cards, i.e. 2x5,4x6, etc. `I>ndex Tgl. : Off` Default is Off. If toggled on by entering an "I", FANFOLD will write text found between delimiters, which may be specified; the default is "`" and "`"(Accent Grave as opposed to "'" and "'" which are single quotes). Any delimiters ( both the same or different ) may be chosen, but they should not occur otherwise within the text. The text between the delimiters is written both to the bottom of the screen during a "Run" and to the .NDX file. After the .ODD and .EVE files are written the "Table of Contents" is appended to the files from the separate .NDX file created during the page writing to file procedure. The Table of Contents is paginated separately for later physical placement. (Note the "`"s which appear in this DOC as delimiters for examples of placement in a Source or .FAN file.) The output is a "Table of Contents" rather than an index, the phrases are indexed by the page within which they appear. If the phrase is in the second column of two column formatting, a "b" is appended to the page number. [S] Thus, "I>index Tgl. : Off" may appear as: FANFLD21.DOC Table of Contents Page n of n Pages . . . 10b I>index Tgl. : Off etc. [E] Because the format of a Table of Contents is a subjective choice, the output is minimal. Use an editor to "fancy up" the output. Note that the .NDX file is a scratch file which may not be edited with any effect. Edit the Table of Contents pages which are appended to the end of the .ODD/.EVE files. `V>iew : Scroll 1st 80 columns as formatted` Permits viewing of the text as formatted (right or left edge), with headers, offsets, etc. displayed on the screen. The text will scroll until any key is entered during a pause prompt. You are then returned to the Format Menu. The parameters may be changed and V>iewed as often as desired. You may also select any start or end page number to view. `E>xit : to CP/M with E0:FANFLD21.FAN Saved` Permits exiting from the Format Menu and FANFOLD to CP/M without writing the formatted files to disk. May be used to permit adjusting the .FAN with your favorite editor after viewing the results. The display at the bottom of the screen gives a symbolic representation of a line as it will be written to the .ODD and .EVE files. [S] ODD: |< text 1..to..78 >| of |80 EVEN: |< text 1..to..78 >| of |80 | O |= Hole tab : T= 8 sp. tab : m=margin : |.s.|= Col. Separator [E] The display will change as the various parameters are entered. When the formatting is Ok'ed by entering a un, FANFOLD will begin writing the odd and even page files (.ODD and .EVE) to the selected disk. But first you will be asked: `Include Printer setup in Files [Y/N/Exit] >` Default is "Y". Answering "Y" places the CLEAR,CPI,LPI, and Tab commands of the installed printer at the beginning of the .ODD & .EVE files for delayed printing with proper printer initialization included. Simply use your favorite method (TYPE,NEWSWEEP, etc.) to send text to your printer; sending the .ODD text first. When complete, turn over the paper in the printer at page 1 and send .EVE. (Actually, in two sided output you may send either file first but it seems right to send first things first.) While it is not recommended, you may insert formatting commands in the .ODD,.EVE,.NDX files and print the files from within Wordstar, NewWord, VDE, etc. Bold and Underlining should work but any changes to linelength, pagelength, and character pitch could destroy the page format. Note: If any installed printer command includes a "^Z" (ASCII 26), you will NOT be given the option to include the printer commands. However, you will be able to print the files from within FANFOLD. FANFLD21 always sends the installed printer commands before sending the text to the printer. (See printer installation below.) If FANFOLD is not installed for the printer (See installation below) the user should answer 'N' to the "Include Printer commands" question and preset the printer to the CPI,LPI and Tab commands consistent with the selected format. Next, you may choose one or two sided output: `Two sided output [Y/N,Exit] ? >` The default is "Y". An answer of "Y" will produce the <>.ODD and <>.EVE files for two sided printout. An answer of "N" will result in the entire formatted output to be written to the .ODD file for single sided printing. No .EVE file will be created. The number of sheets required for printing will be adjusted to reflect the single-sided format. Finally, you may select the start and end page to be processed. Useful if only a page or two of a long text is needed. When the .ODD/EVE/NDX files have been written the Printing Menu is displayed and the following prompts are displayed sequentially: [S] -------TOS--------- GEMINI 10X/FANFOLD v21.0b Copyright 1/29/90 Ron Rock Sr/Jr Chicago,IL --------------------------------------------------------- DONE!! Print FANFLD21.ODD first; Turn over at Page 1 and print FANFLD21.EVE Have > 6 Sheets of paper in your Printer. Enter "P" to Print NOW: [Turn DAISYWRITER ON and LOAD PAPER] or Enter "E" to Exit [ + ] ? > ERASE FANFLD21.FAN/.ODD/.EVE files ? [Y/N +] > Another file [Y/N/Exit] ? > N -------BOS---------- [E] The user has the option of printing the file immediately (if the printer has been installed in FANFOLD) or exiting with the .ODD, .EVE, .NDX and .FAN files remaining on disk for "Manual" printing later (perhaps after adjusting the Table of Contents). The user is told the minimum number of sheets of paper needed for the printout (including the Table of Contents, if selected). If immediate printing is selected you will be asked to be sure the paper is LOADED and the PRINTER IS ON as the format commands will be sent first. The odd pages are printed first; then FANFOLD pauses for the user to remove the paper turn it over at page one and continue the printing of the other side. The Table of Contents is printed last on the corresponding side or sides and page numbered separately as "Page x of Table of Contents". If page numbering has not been excluded in formatting, each page will have "Page n of nn Pages" at the bottom center, corners or top as selected. If you enter "E" for Exit you will be asked: `ERASE FANFLD21.FAN/.ODD/.EVE files ? [Y/N +] >` If you answer "Y" FANFOLD will erase the FAN/ODD/EVE/NDX files. Useful if you have printed the files and wish to process another file. `Another file [Y/N/Exit] ? > N` You may continue on with a new or .FAN file if you answer "Y". --------------------------------------------------------- `When things go WRONG ` FANFOLD is designed to eliminate possible problems or recover if it makes sense. For example, the user is asked if the Source file is in Wordstar format. An answer of "Y","N" or "E" is requested. If a "N" is entered FANFOLD will begin by processing the file as a standard ASCII text. If FANFOLD finds lines greater than 160 characters, it will pause, close the files and ask if the user wants to continue as though the source file is a WS file. FANFOLD will then begin again on a character by character basis rather than line by line. Processing line by line takes only about 1/3 rd as much time as character by character. Thus FANFOLD is much faster with standard ASCII text files. However, if the file is a WS/NW type file with soft 's and spaces FANFOLD convert it to standard ASCII in the FAN file in about the same amount of time as using another utility to "unsoft" it. If FANFOLD seems to be "hung up", try <^C>'s. Next try a ^S^C (control S, control C) several times. If you are not returned to CP/M you must reset. `FANFOLD quit and I got something about an "F0" error ` You just ran out of disk space. Restart FANFOLD after eliminating some files or redirect the output to another drive with more space. As a safety feature, FANFOLD will only "read" from a Source file (The Source File may NOT have an extent of "ODD","EVE" or "NDX" or it may be lost). FANFOLD creates FAN, ODD, EVE and NDX files as it proceeds. Roughly 2.5 times the Source file's size is needed for these files. If you have proceeded to printing, upon completion you have the option of having FANFOLD erase the created files before exiting. `FANFOLD doesn't seem to accept what I enter ! ` FANFOLD sometimes will take a single character and continue...or ask for a character or string of characters PLUS a carriage return "+". It will also ignore an "incorrect" entry. For example, at the formatting menu only a listed character will be accepted. If a Pagelength of "66, 88 or 99" is requested - a "95" is ignored. `FANFOLD keeps saying that the lines are longer than 160 characters! ` Try running the source as a WS/NW type file when prompted. In this mode (byte by byte processing) FANFOLD will end an input line with the first space after 150 characters have been read as an input line. It is good practice to always indicate a maximum linelength to avoid surprises on printing files. If this occurs after FANFOLD has tried to process the file as a WordStar(tm) file, you have a non-text file. If the file looks like ASCII text it may be that at least part of the file was written in a "non- document" mode i.e. no automatic at the end of a screen line and the author did not end a screen line with a but the rest of the line did scroll on the screen. The result is lines of more than 80 characters which may not be "viewable" with some editors. If you try printing such a file you get run-on lines. Perfect Writer(tm) in the "Normal" mode rather than the "Fill" mode is a common offender. FANFOLD will indicate the approximate location of the error in its linecount or the last line V>iewed. Use your favorite editor to locate and correct with a insert or process the file as a WS/NW type. FANFOLD is looking for a hard or soft carriage return to end a line. Even a simple linefeed is converted into a carriage return to end a line. `What happened to all the "." (dot) commands ? ` FANFOLD will drop any line with a "." in the leftmost position. Can be used to pre-edit a file to exclude unwanted lines. If for some reason you wish to retain the dot commands, place a space in the leftmost column of the line in the Source file. Note that the "dot" commands will return to the leftmost column in the ".FAN" file if you have eliminated whitespace in the pre-format menu. `What happens to ^ (control) characters ? ` FANFOLD will delete most embedded control characters. Only ^M and ^J are retained. The ^I (TAB) is converted into a space if the "Delete whitespace" option is selected. Otherwise up to 8 tabs per line will be recognized. Since control characters may be seen by the printer as a printing command, it is best to eliminate them rather than "discover" them at printout time. Most likely your printer would ignore the control character since it isn't in a printer recognizable form i.e. ESC+^B etc. `When things still go WRONG or go RIGHT ! ` If you find this program useful and wish to become a registered user, send your name and address and a donation of $15.00 by check or money order to: [S] Ronald Rock 316 N. Michigan Ave. #400 Chicago, IL 60601 [E] A registered user will receive notification of significant updates and direct mail and/or phone support. Because of the time involved, I will no longer be able to respond to inquiries from non-registered users. ------------------------------------------------------ [S] `INSTALLATION ` IF YOUR SCREEN DOESN'T LOOK RIGHT YOU MUST RE-INSTALL FOR YOUR COMPUTER TERMINAL. IF THE PRINTOUT IS NOT CORRECT YOU MUST RE-INSTALL YOUR PRINTER COMMANDS. FANFLD21.COM has a default or scratch installation of the Gemini 10X dot matrix printer. Any other printer may be installed. FANFOLD as found in this Library is installed for a KayPro, without highlighting. With some exceptions, the KayPro emulates the ADM3 terminal. Exceptions: clear to end of screen, clear to end of line, home cursor, insert line, and delete line. FANFOLD does not use HIGHLIGHTING, REVERSE VIDEO, DIM or UNDERLINING. However, FANFOLD does utilize the cursor addressing, clear to end of screen, clear to end of line, home cursor, insert line and delete line. YOU MUST INSTALL THE TERMINAL COMMANDS BEFORE ANY CHANGES TO THE PRINTER OR DEFAULT COMMANDS. If you do not, the screen will not be correct. 1. To install FANFLD21.COM just enter "FANTRM21 FANFLD21.COM" and you will be guided through the Terminal Installation procedure. The following files should be present on a single drive/user area: [S] (all the files present in FANFLD21.LBR which are not Doc's) FANFLD21.COM FANINS21.CHN (only needed for "INSTALL" (Printer/Default) FANtrm21.COM (only needed for Terminal Installation) FANTRM21.DTA (only needed for Terminal Installation) FANTRM21.MSG (only needed for Terminal Installation) [E] Unfortunately, FANFLD21.COM has been changed to a Start: 21A0 End:D180 to provide for the INSTALL option and permit full DU: specification. If you are installing V.21 you MUST use the "INSTALL" parameter. You may wish to copy the printer/default commands from eariler versions and have them handy for the new installation. `TERMINAL/COMPUTER INSTALLATION` If you are NOT running a KAYPRO you MUST install your Terminal first. With all the above files on the same DU: enter: A0> FANTRM21 FANFLD21.COM When you are asked what you wish, answer "T". You will be provided a list of terminals which may be installed. IT IS NECESSARY TO INSTALL YOUR TERMINAL AND WRITE THE NEW FANFLD21.COM FILE BEFORE INSTALLING/CHANGING THE DEFAULT/ PRINTER CODES. IF YOUR TERMINAL HAS NOT BEEN WRITTEN TO THE FANFLD21.COM FILE, THE DEFAULT/PRINTER MENUS WILL NOT APPEAR CORRECTLY ON SCREEN. Enter "FANTRM21 FANFLD21.COM" (be sure to enter the ".COM", extention) and select Terminal Installation. Your choices will be: [S] "Choose one of the following terminals: 1) ADDS 20/25/30 12) Kaypro with hilite 23) Soroc new models 2) ADDS 40/60 13) Kaypro, no hilite 24) SSM-UB3 3) ADDS Viewpoint-1A 14) Lear-Siegler ADM-20 25) Tandberg TDV 2215 4) ADM 3A 15) Lear-Siegler ADM-31 26) Teleray series 10 5) Ampex D80 16) Liberty 27) Teletex 3000 6) ANSI 17) Morrow MDT-20 28) Televideo 912/920/92 7) DEC Rainbow, 8 bit 18) Osborne 1 29) Visual 200 8) Hazeltine 1500 19) Otrona Attache 30) Wyse WY-100/200/300 9) Hazeltine Esprit 20) Qume 31) Zenith 10) IBM-PC CCP/M b/w 21) RC-855 (ITT) 32) None of the above 11) IBM-PC CCP/M color 22) Soroc 120/Apple CP/M 33) Delete a definition Which terminal? (Enter no. or ^Q to exit):" [E] If none of the listed terminals are correct, select the "None of the Above" and you will be permitted to enter a new terminal definition. I suggest you have your terminal manuals handy and check the values for a nearly matching Terminal. NOTE: When you enter a command ASCII value, enter a then the next value. The initalization/de-initalization strings may be up to 15 values, other command strings may be up to 5. `DEFAULT/PRINTER- Change or Installation` 2. Once your terminal has been installed in FANFLD21.COM it will be saved to disk and you will be returned to CP/M. Using this "new" FANFLD21.COM enter the command line: "FANFLD21 INSTALL". Check that the named terminal is now correct and follow the instructions. You may return to the scratch distribution values for the Gemini 10X and default responses by selecting the scratch option. You will lose/overwrite any current printer/default values. Thus, use this option only when you wish to begin from "scratch". You will NOT have to re-install your terminal. You may change/correct values by stepping through the menus. You may now install your printer commands by following the screen prompts. In general you will be asked for the byte length (in decimal only) of the command for a particular printer function followed by the specific bytes. You may find that the optional ASCII DECIMAL conversion table is helpful. The actual codes must be entered in ASCII DECIMAL format only. Thus an "ESC" code is "27" NOT "1B" etc.,etc. To have the table displayed on-screen answer "Y" to the prompt. NOTE: If any of your printer control commands includes a ^Z ( 26 ASCII ), you will be warned that the printer code cannot be included in the ODD/EVE files for "manual" printing outside of FANFLD and you will NOT be given that option. The ^Z code is the CP/M END OF FILE code and output will cease with the first line of the ODD/EVE file. FANFLD21 will accept a ^Z and send it to the printer code before sending the ODD/EVE/NDX files. If the code is NOT written to the files, printing will proceed. Very few printers require the ^Z command in any string, but one or more do. It may be possible to use an alternate command string for such printers. 3. After you have run FANFOLD for a period of time you may wish to alter the Default values. In general, if you find that you almost always change a particular value you may wish to change those values. Note well - It is not recommended to change the "WS/NW type file ?" default to "Y" even if you usually use FANFOLD on such files. FANFOLD reads a WS/NW type file byte by byte and as a result the processing time is significantly increased. If FANFOLD finds lines without "hard returns" it will prompt for a restart as a WS/NW type source file. As an aside, you will find that installing printer commands can be difficult since even the manual may not give the proper command string. The problem is familiar to those of us who have written printer setup programs. For example a command may be given as " 32". Is that (in hex) a 2 byte command "1B 32" or a 3 byte command +"3"+"2" which would be "1B 33 32". Also is a "0" a hex 00 or 30 (the hex value of the ASCII number 0)? FANFOLD requires the ASCII DECIMAL value of the particular command byte. Systematic trial and error may be the only answer. [S] For your convenience: -------------------------------------------------------------------- (You will need the following PRINTER codes for your printer ) Current ( ASCII decimal ) FANFOLD Printer Codes: (scratch area) 1. Printer Name : GEMINI 10X _______________ 2. RESET code: 2 bytes > 27 64 _ _ _ _ _ _ _ 3. 11 INCH Page Length: 0 bytes > _ _ _ _ _ _ _ 4. 10 characters per inch: 3 bytes > 27 66 1 _ _ _ _ _ _ _ 5. 12 characters per inch: 3 bytes > 27 66 2 _ _ _ _ _ _ _ 6. 17 characters per inch: 3 bytes > 27 66 3 _ _ _ _ _ _ _ 7. 20 characters per inch: 3 bytes > 27 66 3 _ _ _ _ _ _ _ * 8. 66 lines per page: 2 bytes > 27 50 _ _ _ _ _ _ _ 9. 88 lines per page: 2 bytes > 27 48 _ _ _ _ _ _ _ 10. 99 lines per page: 3 bytes > 27 51 16 _ _ _ _ _ _ _ 11. 11 TABS of 8 each: 14 bytes > * enter 17 cpi if 20 not avail. 27 68 9 17 25 33 41 49 57 65 73 81 89 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Choose # to change ( to Exit) > ~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ____________________________________________________________________ Current FANFOLD Menu default responses: 1. Is Source a WS/NW type file : N 2. Write output to another Drive : N 3. Output OK : Y 4. Reformat for new Maximum Linelength : Y 5. Max Linelength [1 - 160] : 78 6. Truncate unaltered : Y (try "N" here) 7. Delete whitespace : Y 8. Carryover : N 9. Fill : Y 10. Justify : Y 11. Flushleft All : Y 12. View results : Y 13. Include printer setup in Files : Y 14. Two sided output : N 15. Reset "as is" Start Toggle [to 3 chars] : [S] 16. Reset "as is" End Toggle [to 3 chars] : [E] 17. Number of Header Lines : 2 18. Number of Footer Lines : 3 19. Page # in lower M>iddle; C>orners; T>op or N>one : T Choose # to change ( to Exit) > ~ ______________________________________________________________ Ronald Rock 316 N. Michigan Ave. #400 Chicago, IL 60601 FANFOLD Registered User Application Enclosed is my $15.00 donation. I understand that as a registered user I am supporting the use and development of FANFOLD and qualify for direct mail and/or phone assistance, notification of significant enhancements and posible customization for my particular application. A nominal fee may be required for extensive customization. Name:__________________________________________ Address:_______________________________________ City:___________________ State:__ Zip:_________ The following is optional information: My computer is a ___________________________________;screen width___/lines___. My printer is a ___________________________________ I do not have TurboPascal ___ I have Borland's CP/M TurboPascal version #_________ I have a TPA of _______k as I normally run, with a maximum available ____k TPA. If sufficient interest develops to create a FANFOLD BBS, I understand that as a Registered User I will have pre-arranged private access to the FANFOLD BBS . [E]