.DOCMaster V1.0 Documentation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 1991 Peter Corlett This program was written with AMOS 1.3, and compiled with the AMOS compiler V1.00 (so you can't nick my requestors...) Legal bit: ~~~~~~~~~~ This program is not public domain, but freely distributable. You are not allowed to charge for this program, even to cover costs, without gaining permission from me. No warranty is given for any damage or loss, directly, indirectly, caused by this program. Problems are your problem, not mine. There are also no warranties as to the quality of this .DOC file. If it is any better than useless, then I will be surprised. Introduction: ~~~~~~~~~~~~~ This program was written, as I seemed to have tons of .DOC files that I couldn't print out without wasting loads of paper, and also, having an ugly printout. A few initial versions were written which did the job, but were very hard to customise, as they were 'hard-wired'. Now I have redesigned the front end, and cleaned the code up, and this is the result. Use: ~~~~ This program was written to be easy to use, and I have come up with an Intuition 2.0 like frontend, which works well with text input. To edit some text, click on the textbox where you want the cursor to go, just like intuition. You can use cursor left/right to go through the text. Backspace and Delete work as you would expect. Cursor up/down moves between the fields (I didn't know about TAB/SHIFT-TAB at the time of writing this.) Escape types '|['. Some boxes require some control codes, and so the method of entry I chose is the method used on the Acorn machines for their strings. The character | precedes control codes like so: |@ = 0 |A = 1 |B = 2 to |Z = 26 |[ = 27 |\ = 28 |] = 29 |^ = 30 |_ = 31 ( |[=ESCape ) A few special ones are used as well: || = | |? = 127 (Backspace) |! = 128 + code of next char eg |!|? = 255 If you can't understand this, go and see your local Beeb/Electron expert. The gadgets: ~~~~~~~~~~~~ Firstly, those that define the printer effects etc Printer name Type the device name of the printer. This will usually be PRT:, PAR:, SER:, NIL:. If you want to print to a file (why?) then click on the 'Printer Name' itself, and you will get a filerequestor. Reset This is the control code for a printer reset. Newline This is the control sequence for a carriage return. This is likely to be |J On page This is the control codes to affect the text printed. This should contain ALL the codes needed, such as NLQ, line spacing, condensed, etc. A disable paper out would go here as well (but be careful with it.) After page This is what to print after the page. Usually a |L to formfeed. If you disables the paper out, then enable it here (preferably ASAP) Next, there are the formatting controls. These are used to produce multi-column text, and to force pages to a fixed length. Column width This is how wide you want your columns of text to be. This is typically 79 or 80 No. colums How many columns do you want? Column space This is how much of a gap is put between the columns. 0 is for no gap (ie possible bleeding between columns.) 1 or 2 is about right for this (depends on file and page layout.) Row height This is how high you want your rows to be. 66 is the likely value for already processed textfiles, eg those 'printed' from a wordprocessor. No. rows How many rows do you want? Row space This is how much of a gap is put between the rows. 0 is for no gap (ie possible bleeding between rows.) 2 to 4 is about right for this (depends on file and page layout.) TAB value This says where the TAB stops are placed. 0 means ignore it, 1 means do a space, anything else causes a TAB to multiples of that number. Usually files are written with a TAB of 8. Now we just need to know what to print. File to print Either enter the name in the box, or click on the 'File to print' box, and you will get a filerequestor. Finally, we have boxes that cause things to happen. Undo Cancels everything changed. Use Fixes text. It will tidy up the numbers, and clean up the control code strings. It stops Undo as well. PRINT FILE Prints the file. An image of the page will appear. If you want to print it press 'Y' and it will print. It will let you print as many copies as you wish, by repeatedly pressing 'Y'. 'N' will go onto the next page. 'A' will cancel the print altogether. Load settings As the control codes can get complicated, you can load and Save settings save them. The datafiles are put into S:, with the .PRT extension. About Backslapping, copyright, distribution etc. Quit If you don't want to exit, then this is the best gadget to avoid. there is no check if you don't want to, either. Comments: ~~~~~~~~~ This is just a taster of this program. Because I didn't make any backups, I don't have the source to this program, so the next version (which will probably NOT be freely distributable) is going to be really nice (I know, because I have an almost working copy.) It seems to me that you should print to PAR:/SER: rather than to PRT:, as I have found that some of the useful effects can not be performed using the ANSI codes (or maybe the EpsonX driver is dud.) There seems to be some interesting things that the printer.device can do to the codes, that can ruin a printout. Of course, if you need to print international characters, then you might have to use PRT:. Most docs come formatted to 80 columns, so there is usually no problem there. If your file is not formatted at all, ie it is just one line with a CR at the end of the paragraph, then you are in trouble. Maybe next version. Source code files don't always need the full 80 columns. (Especially 680x0 code.) A good value to use is 3 columns, 52 wide, with a gap of 2. This gives exactly 160 wide. Contact: ~~~~~~~~ Bug reports (I know there are a few, but I can't find them,) flames, comments, suggestions, money, disks (floppy or hard...) to this address: Peter Corlett Derwent College University of York Heslington York YO1 5DD ENGLAND You can also email me, I am 'pnc-a@minster.york.ac.uk' Ideas for improvements: ~~~~~~~~~~~~~~~~~~~~~~~ [Comments about the newish in development version in brackets] * Debug it. [Rewrite will introduce NEW bugs] * Print whole directory, eg for ARP docs. * Powerpacker decrunch? * Even more control over the printing, eg reformatting the files more. * Support for ANSI codes. At the moment, the ESC is ignored, and the code such as [23m is printed out! If $9B is used as the CSI, then it will be interpreted by PRT:, and will muck up the formatting! To PAR: it will come out as a weird character (probably o-umlaut.) * A page header handler. [Done] * Special effects menu, saving typing the codes. [Done] * More? Write to the address.