.po 15 .XY MML Systems Ltd 11 Sun Street Finsbury Sq London EC2M 2PS 01 247 0691 +- -+ +- -+ ++ ||\\ //|| ||\\ //|| || Pentlow Mill || \\ // || || \\ // || || Cavendish || \V/ || || \V/ || || Suffolk. || || || || || 0787 281072 || || || || |________| This documentation is copyright A.R.M.Clarke 1987. Note:- PRINTIT is being continually updated to add features, printer drivers and fonts. This is unfortunate, but people continually point out deficiencies and suggest enhancements. Contact MML for details of the current state of the art. If you are in any doubt if you have the latest version, then ask us. We have a modest copying charge so beware! We are scheduling to produce a version that does proportional fonts, larger typestyles, right justification, etc. This manual is enough to get you started and tells you all the currently available features. For a full printed tutorial guide, ask MML at the above address. PRINTIT is designed to work on any CP/M Plus or MSDOS machine. To do its NLQ (near-letter-quality) printing, it requires an Epson, or Epson-compatible printer. As we use very few of the Epson features, the chances are that your dot matrix printer will work with it. A technical manual, that tells you how to design your own fonts, is in preparation. Ask us for details!. More super fonts are available from MML Systems Ltd. .pa Introduction. Printit is designed to print out files. It will do very much more than that. If you have an Epson- compatible printer, it will print them out in various NLQ styles. It will also automatically modify text files, taking one file and producing another. You can use Printit to make a whole lot of changes in a file. If, for example, you wished to put embedded printer commands into a file, you could do it by inserting mnemonics for the printer commands into your file. Remember, at this stage, only that there is a lot that PRINTIT will do Printit really comes into its own when used with an Epson MX, FX, or LQ printer or compatible, and produces typeouts in NLQ (Near Letter Quality). We provide a number of fonts on the disc to enable you to print out documents in a relatively presentable format. With Printit, there is no need to get a fancy printer. We work magic from a dot-matrix printer. .cp 20 How to work printit You need to boot CP/M or MSDOS, depending on the type of machine you have. You also need the files with the filetype .FNT. You should make sure that the clock is set if you are going to print out the current date properly. If you are using the MSDOS/PCDOS version, then you need to delete PRINTIT.COM before you start. To use printit, you need to copy PRINTIT.COM (or PRINTIT.EXE on the PC) onto the disc you are using. You should see a sign like this:- A> or B> or maybe C> (yes, some people need to be told this!) Decide on the file you want to print out. We have a various example files on disc that you can try. Lets use as an example PRACTICE.DOC. Type the following:- PRINTIT PRACTICE.DOC Did you have the fonts on the disc? Did you have your printer connected? If so, then it should have worked. Now, flushed by success, why not try to type out the test files. (These are meant to try out, and demonstrate, all the features of the program). Make sure that you can see the system prompt. (eg A:) Type:- PRINTIT TEST.1 Not too hard was it! then do PRINTIT TEST.2 and so on and so forth You can do a lot more with PRINTIT. .cp 40 What does PRINTIT do? Essentially, Printit is all about producing nice printout on a dot-matrix printers. I always like software solutions to problems. Instead of getting another printer (costing MONEY) I like to try and make the best of the equipment that I have got, and obtain the best possible results from it. There are several Microcomputer users who would benefit from this work: Amstrad 8256 and 8512 users who have that nice little plastic printer attached; PC users who have an EPSON 'IBM' printer, poor people who want letter quality and can only afford one printer and so on. I particularly enjoy using PRINTIT because it enables me to design my own fonts. I am a lazy person who hates chores that involve altering text. As I tend to be rather involved in writing and editing text, and hacking programs about, I often find myself faced with some awful chore like renumbering paragraphs, making laborious text substitutions, reformatting pages and so on. I tend to write a program to do the job, or use an existing program. Although it takes longer to get started, it is always quicker in the long run. PRINTIT is bristling with features that can be brought to bear on such one-off tasks. In a sense, I have written it in the same style as Scrivener, in that it takes a bit of effort to get started with it but it soon should prove its worth. Essentially, PRINTIT is designed to print one or more files on the printer. It will actually 'print' it onto a new file if you prefer. In order to give you more control over the way that text is printed, I have put in four different ways of controlling the way the page is laid out. The reason for doing it this way is that one way of controlling one job will not necessarily suit another. The first method is the traditional "dot command". This relies on the assumption that no line ever begins in a full-stop. Any line starting with a full-stop is treated as a formatting command and is not printed, but read to see if it is a formatting command. The assumption that no line ever starts with a dot is not always valid, and resulted in several lines becoming lost in our book "The Amstrad CP/M Plus" as a result. A second method is that which is exemplified by PIP.COM. This is the toggle and command line parameter. This might seem very primitive compared with other methods, but actually means that you need not edit your text file in order to print it. It also means that you can do routine printing jobs from a batch file (submit file in CP/M and Batch file in MSDOS.) A third method is the macro. There are built-in macros, so that for example, whenever you have the word '_page_' in your document, the current page number is substituted. There are others such as '_date_', '_line_' and '_file_' which need no explanation, an '_input_' macro that takes text from the keyboard, and four macros called '_bump1_', '_bump2_', '_bump3_', '_bump4_', that print out a number that increments every time the substitution takes place. I intended this for paragraph or item numbering, but there are bound to be more uses. The user can define his own macros, so that one piece of text is substituted for another. The most obvious use is to put printer control codes into the output. '_ELITE_', '_PICA_', '_SUPERSCRIPT_' or so on. (There is a sample file that does some FX codes). The macro feature can be made immensely powerful, and is perfect for that awkward job that cannot be done any other way. A fourth method, which I think may be unique to PRINTIT, is a paste-up or page-makeup file. This essentially is a design for the page and allows you to specify the exact layout of each page, including titles, page numbers, the type area, the text body, and so on. Later revisions of PRINTIT will elaborate the ideas of such a file. It really means that you need only define the way you want pages printed once and you can use that file for ever afterwards. The most useful 'pasteup' file I have has my address, the current date, the telephone number and so on. I just have to type the body of the letter nowdays. We will discuss and describe all these methods in due course. SWITCH settings. When you invoke PRINTIT, you need to specify the list of files that PRINTIT needs to print out. You can also specify HOW you want it printed by specifying the details in a series of codes at the command line. For example, if you wish a pasteup file called PASTEUP.FIL to be loaded in order to provide the format to FLANNEL.TXT, you could type PRINTIT -pPASTEUP.FIL FLANNEL.TXT. This means "Firstly load up the pasteup file, and then print the file called FLANNEL.TXT." Notice that the first character of a switch is a minus(-) sign.This is merely a commonly used convention to signal to the program that a parameter or switch is coming. The switch settings are:- -A ("Append") Write the output to a file, putting the output on the end of the file if it already exists. -B ("Begin") Start printing when the page number following the switch is reached. eg: PRINTIT -b20 TEST.DOC This starts printing TEST.DOC on page 20. -C ("Console") Send the output to the console (useful for debugging a complicated bit of 'MACRO'ing before sending it to the printer. This saves Piles of paper) Note that if a further switch instruction is found, then the output may be diverted appropriately. If, for example, an instruction is found to use a particular font, then the program will not unreasonably assume that you wish to use the NLQ 'fancy' output. -D ("Drive/Directory") Send the output to a file on a drive or directory specified by the string following the 'D'. The name of the file is the same as the source file, therefore making it possible to process a whole lot of files at once. eg: PRINTIT -dB: *.C This processes all the files of filetype '.C' and put the results under the same filename on drive B:. With MSDOS, you can specify the directory path as well as the drive. -E ("End") End the print run on the page number following the switch. eg: PRINTIT -e23 prog.doc This prints the file until it reaches page 23. -F ("Font") Load up the font specified by the name of the filename following the 'F'. If, for example, you wished to load up a font file called 'COURIER.FNT' then you would use the command -fCOURIER.FNT. All subsequent output goes to the printer in NLQ mode in the font specified until a new font is specified. eg: PRINTIT -fBATARDE.FNT TEST.9 loads up the font called BATARDE.FNT and puts TEST.9 to the printer in NLQ mode. -G ("Garrulous") Put on the screen the latest information and settings as the program runs. See also -Q. -H ("Halt") Pause to allow paper to be put in the printer after each page. See also -T. -M ("Macros") send all the defined macros in an alphabetically sorted list to the output at the end of all the processing. This is a great help when debugging complex macros. -O ("Output") Specifies the name of an output file in which to place text. The text goes to the file specified. If a string of files are processed, all the output goes to the output file specified. eg: PRINTIT -oMYFILE *.doc This takes all the files of filetype '.DOC' and puts the output in a file called MYFILE. If you do not specify an output file, and specify that the output must go to disc (with -W or -A), then it will go to a file called OUTPUT.FIL. -P ("Pasteup") Loads up the pasteup file specified by the filename following the P. The pasteup file is immediately loaded and used to format all subsequent input until overridden by a new pasteup file or a dot- command. eg: PRINTIT -pPASTEUP.FIL TEST.10 This would load up the pasteup file called 'PASTEUP.FIL' and uses that for formatting information to print out TEST.10. -Q ("Quiet") If the the latest information and settings is being put on the screen as the program runs. (specified using the G switch) then this can be switched off using this command. -S ("Simple") This sends all subsequent output to the printer 'simply' ie without conversion to NLQ. If, for example, you wanted to use a daisy-wheel or an incompatible printer, you would need to use this command. -T ("Terse") Disable the pause after printing each page. -U ("Ubiquitous") Allow macro definitions (you know, all those things starting with '<<' and ending with '>>') to exist on the same line as plain text. See the section on macros. -V ("Vacate") Eliminate all lines in which a macro definition occurs. (macro definitions are those commands that begin with '<<' and end in '>>'. See the section on macros. -W ("Write") Specifies that output should go to a file, any existing copies of the files are erased before writing starts. Unless you specify otherwise, the file is called OUTPUT.FIL, but it can be changed to any other name by means of the 'O' switch. You can use the 'D' switch to make the output file the same name as the input file. -X ("Xylonite") This switch allows macros to be used in macros. In certain circumstances, you may wish to have macros representing other macros. If you allow macros to be 'nested' like this, you can run into trouble when doing simple substitutions. If you are not concerned with defining macros, just forget it. see also -X. -Y ("Yank") This switch prevents macros being used in macros. In certain circumstances, you will not wish to have macros representing other macros. Use this command if you just have a list of simple substitutions and do not have macros which themselves stand for macros or commands. If you are not concerned with defining macros, just forget it. See also -X -Z ("Zeitgeist") Use this command if you wish to switch to NLQ printing. -.xxxx (where .xxx is a dot command. This allows you to enter dot commands as command line switches. Switch commands can be combined if they are simple one-letter commands. Therefore: PRINTIT -SYMG TEST.ONE means 'use simple printer output, prevent macro nesting, print all defined macros at the end of the file, and put on the screen all the latest settings' and then go ahead and do TEST.ONE. Naturally, you will not wish to remember these switches, and it is better to use 'submit' (CP/M) or 'batch' (MSDOS) files to do your work for you once you have established the right settings. if you wish to use a switch and are specifying filenames, then you cannot combine switch settings. You will have to do them in a list. To print TEST.7 using the normal font and using the pasteup file 'PASTEUP.FIL', you would need to use the following command PRINTIT -pPASTEUP.FIL -fNORMAL.FNT TEST.7 The purpose of putting all these switches in the command line is that you can specify settings without tampering with the file and you can set up batch jobs using a '.BAT' file (MSDOS) or '.SUB' file (CP/M). If you wish to put switch settings into a file, you can do that by the command. <<#switch xxx>> where xxx are the switches. A use of this, for example, is where you want to changs fonts in a file, or change a pasteup file. If you wished to load the LOMBARD.FNT file, you could put in the line <<#switch -fLOMBARD.FNT>> BEWARE, the rest of the line is not printed out to the output unless you specify the 'U' switch. Using the <<#switch>> command gives you great flexibility and allows you to set up pattern files for all sorts of letter-writing purposes. DOT Commands. Dot commands are an excellent way of specifying the way that text should be formatted from within the file. Page breaks and conditionl page breaks can be inserted. These dot-commands are a subset of the /Wordstar/newword dot commands. They are put in the program to extend its usefulness and allow the printing of wWordstar files without too much alteration. If you have another wordprocessor then -- Tough. I've only got Wordstar and NewWord. Remember that the lines containing dot commands are ignored and are not put in the output. You can also use dot commands at the command line by preceding it with a '-' sign, thereby specifying such useful things as the lines per page and the line height. .PA This means that a page break should be inserted .PO n This specifies the left margin (This is the number of spaces skipped at the left hand side of the page before we start printing.) .PN n This specifies the page number to be used when printing out the next page number (it usually increments from 1 upwards). .pl n This specifies the page length. This is the number of lines that can be printed on a page if we start right at the top and print all the way down to the bottom of the page. Normally, we assume it is 66 lines unless the program is told otherwise. Note that altering the line height in NLQ mode affects this too. .LH n This sets the line height in NLQ mode. It is in 1/48 ths of an inch (to be compatible with WordStar). A value of 8 gives normal line spacing of 6 to the inch, a value of 6 gives 8 lines per inch, and 12 gives quarter inch line spacing just like a typewriter. You will need to change the page length (.PL) too, so get out your pocket calculator and work out how many lines you can fit! .IG This is used for putting comments in files. The whole line is ignored by PRINTIT. .CP n This inserts a page break if there are fewer than n lines left on the page. This is useful to prevent 'Widows and orphans'. If you do not know what a 'widow and orphan' is, then you probably will not be too fussed anyway if you get them. .MT n This specifies the number of lines to send at the top of the page, before printing the next line of the file. The margin top or header is the number of lines at the top of the page which are normally skipped before we actually start printing. We allow three lines unless this is set consciously by the user to a different value. .MB n This specifies the number of lines to leave at the foot of the page. This quantity is the footing and is the number of lines at the bottom of the page which is skipped. We usually allow five lines, but you can change this. .XY This is a dot command to disable all commands and macro substitutions. This is necessary in order to print out your macro command files, and also to print parts of this documentation. .XN This is a dot command to enable all commands and macro substitutions. This is necessary if you have done a .XY command and want to reenable macros and commands. .cp 40 MACROS. When we talk of macros, we mean a string of characters which PRINTIT substitutes with another string. If, for example we had a piece of text which went:- "With one bound, he was by her side. She felt his iron hand on her shoulder. He swung her round and their eyes met. "What does he really mean to you?", he asked, his cold eyes boring searchingly into her own. He embraced her and she felt herself wilting in his strong manly arms." If we substituted all instances of 'He' for 'She' and vica versa, substituted 'his' for 'her', 'him for 'her' ,'His for 'hers' and so on, we ginger up the prose into a much more non-sexist version. We do this by the following artifice. <<#switch y>> << his :: her >> << her :: his >> << he :: she >> << she :: he >> << hers :: his >> << She :: He >> <> <> <> <> <> This syntax is entirely arbitrary. The double angle-bracket signals that a definition is to begin. The first word, or phrase is the one that is to be changed. Then comes a double colon, separating the header (what is to be changed) from the body ( what it is to be changed for). The double close-angle-brackets denotes the end of the definition. Note that capital letters are significant and spaces matter too. These definitions can be in the file, or can be in a separate file. The resulting prose is much less likely to offend the sensibilities of the feminist movement. "With one bound, she was by his side. He felt her iron hand on his shoulder. She swung his round and their eyes met. "What does she really mean to you?", she asked, her cold eyes boring searchingly into his own. She embraced his and he felt himself wilting in her strong womanly arms." Note that, because we cannot distinguish between 'her' (posessive) and 'her' (referring to she), we sometimes mistranslate to 'his' rather than 'him'. We would need to touch the results up with a wordprocessor. This provides the means to implement all sorts of projects, such as translating a novel into Geordie, or translating hansard into Glaswegian. This manual could be translated into cockney rhyming slang. (I tell you no porkies.) Note that we need to prevent repeated macro substitutions using the 'Y' switch. (see the 'switch' commands). This is because, otherwise, PRINTIT would see an occurence of 'he', and substitute 'she'. It would then see the 'she' it had just put there and substitute a 'he'. It would then see the occurence of 'he' that it had just put there, and substitute 'she'. Then....fortunately, the program eventually tires of all this and aborts the run with an error! Essentially then, macros are simple devices for text substitution. They will do rather more than this. There are some special macros that we give you, that do special text substitutions. _date_ Substitutes the current date. Note that this will only work if you have set the system clock properly. This is useful for putting the date on letters or on such things as program listings etc. _filename_ Substitutes the name of the current file being processed. _line_ Substitutes the line number of the current line in the file. _page_ Substitutes the current page number. _input_ Substitutes whatever is typed on the keyboard. _esc_ Substitutes an ESC character (useful for controlling printers) _tab_ Substitutes a TAB character into the file. _bump1_ Substitutes an incrementing number. Every time the macro is called, the number is incremented. This was intended mainly for paragraph, and reference numbering, but there are many uses for this device, _bump2_ See _bump1_ _bump3_ See _bump1_ _bump4_ See _bump1_ _lpage_ This types the page number if a left hand page is being printed. Along with _rpage_, this allows the page numbering to be correctly positioned in a bound printing. If you put your page numbers in the centre, you need only use _page_ which always prints the page number. _rpage_ This types the page number if a right hand page is being printed. See _lpage_ for details. _ltitle_ This will print out its macro body only on a left hand page. It needs to be redefined to the body that you wish before you use it. If, for example, you wish to print out the title of a piece of text only on the left hand page, you might do something like <<_ltitle_::Lady Loverly's Chatter>>. Every time PRINTIT finds _ltitle_ in the text, it will substitute 'Lady Loverly's Chatter'. _rtitle_ This will print out its macro body only on a right hand page. If used in combination with _rtitle_ it allows titles of chapters etc to be printed in the proper position for a bound printout. _file_line_ This substitutes the next line from the current merge file. _overtype_ If substituting one phrase for another, the usual method is to take out the phrase to be changed, and insert the phrase to substitute for it. If your text is in nice columns, and the two phrases or strings are not of the same length, this can cause havoc. This is particularly true if you have a nice title in the top of the page, and a page number on either the left or right hand side. It all goes out of alignment. Using the _overtype_ macro actually does nothing but ensures that the new string or phrase is 'written over' the old one rather than inserted in at the same location as the old. _insert_ This undoes the effect of the '_overtype_' macro. See the _overtype_ command. In future, the old string is removed from the text and the new string is inserted in its place. One powerful use of macros is to put control characters into the file for controlling a printer. Naturally, this will not work when you are in NLQ mode as the program takes full control of the printer. In simple mode (switch S), you can take full advantage of the features of your printer. You will need the manual. If you have a fancy machine such as an Epson LQxxxx you have numerous NLQ fonts and may not need PRINTIT's fonts. You can get special effects by embedding macros. You can put hex codes between 'backslashes'. Lets take an example. ESC E sets emphasised mode on the printer. This is done like this. <<_emphasised_::\1B\E>> Now, whenever you put '_emphasised_' into your file, you will end up with the printer code, which will go out to the printer and put it into emphasised mode. Here are a few others:- <<_notemphasised_::\1B\F>> <<_doublestrike_::\1B\G>> <_notdoublestrike_::\1B\H>> There is a great deal you can do with these commands. .cp 40 Commands. As well as macros that can be defined by the user, there are a number of commands. These are generally placed between double angle brackets to signify that they are not part of the text to be output. The line on which they occur is not printed out. There are the following commands. <<#display xxxx>> where xxxx is a sentence to display on the screen. eg:- <<#display Now printing file one>> would display the message "Now printing file one" on the screen. <<#include xxxx>> where xxxx is the name of a file, or series of files. eg:- <<#include *.c>> would print out all the files of the filetype '.C' <<#include chapter.1>> would print out the file called 'chapter.1'. This command is useful for reading in a file of macro definitions to go with a particular files or to print a series of files in a particular order as, for example, when printing out a book. <<#radix n>> This is used to alter the radix in which control characters are entered. If you need to define a whole lot of printer control codes and it is most convenient to do so in HEX, then you need only type << #radix 16>>. eg:- <<#radix 10>> means that all subsequent control characters are entered in decimal. #input The #input command is used in defining macros, either instead of the header (the phrase which is taken out) or the body (what is put in its place). eg:- <<_address1_::#input>> This puts a prompt on the screen (see #prompt) and takes a string from the keyboard (terminated by a carriage return) or, if redirection is in place, from another file. The prompt that goes to the screen can be defined by the #prompt command, or can be placed after the #input command. A default value can be defined if no string is returned from the keyboard (the user just hits a carriage return). see the #default command for details. All subsequent occurences of _address1_ are substituted by whatever is input or, if a default was previously defined, and no string was entered, the default is used instead. <<#input who is the prime minister::the prime minister>> This would take a string from the keyboard and use this as the string to be taken out of the file to have the string "the prime minister" substituted for it. The input command is handy if you need to print a whole lot of files that differ only by the odd word here and there. eg: <<#input for what should I substitute 'The defendent'::the defendent>> <<_postcode_::#input What is the postcode, please>> <<#default xxxx>> This command defines a string xxxx which is used as the default value for subsequent input commands if the user merely presses ENTER or C/R when the input is requested. This makes a user- friendly system more possible, if sensible defaults are provided for each input. eg:- <<#default Steel Rods>> This would ensure that the next input would have the default "Steel rods". note that this command is valid for the macro "_input_" which does input in a body of text. <<#prompt xxxx>> This is used to provide the prompt for the next _input_ command. A prompt appears on the screen and a response is elicited from the keyboard (or file if redirection is in place). see the #input command, the #default command and the _input_ macro. <<#merge xxxx>> This command specifies the file from which input is taken for the _file_line_ macro. Whenever the _file_line_ macro is found, PRINTIT substitutes the next line from the file, until the end of file is reached, whereupon null (empty) strings are substituted (in other words, the macro is taken out and nothing put in its place). <<#switch xxxx>> This is the command that allows switches to be embedded in the file rather than being put in the command tail at the system prompt. The switch command allows the control of output, layout and fonts from the file itself. With this command, and the include command, sophisticated and time-consuming jobs can be completely automated. eg:- <<#switch pPASTEUP.FIL>> This loads the paste up file called PASTEUP.FIL to establish the format for subsequent formatting. be Using a Paste Up file. For some people, a paste up file is an easy concept to grasp, for others it is anathema. No need to worry, it is there purely for convenience; if you do not find it convenient, then do not use it! Imagine printing a file and, simultaneously, printing the common parts of the page layout over the top of it. Normally, one uses macros on top of it. Lets try an example. We wish to type a letter. Some parts of the letter are invarient Pentlow Mill, Cavendish, Suffolk. CO10 7SP 2.45 24/2/87 Naturally, the date changes,but you will remember that we have a macro to give us the current date. Other parts are changeable, such as :- To:- A. M. Stradivarias, The Leys, Bognor Regis, Sussex. Dear Sir Thank you for your letter comlaining about PRINTIT. I suggest that your problems may be solved by reading the manual. I know that there is something revolutionary about this, and that you view a program as a sort of open-ended adventure but I really must insist that you will find the answers in the manual. There is really no need for pestering me. Many, I know, regard it as a challenge to work a program without looking at a manual and others, I agree, think that the disk manual is only there to bulk up the disk. In your case, a perusal of the manual would save your time and my temper. Yours sincerely Andrew Clarke We can print the invariate part together with the letter as follows:- Pentlow Mill, Cavendish, Suffolk. CO10 7SP 2.45 24/2/87 To:- A. M. Stradivarias, The Leys, Bognor Regis, Sussex. Dear Sir Thank you for your letter comlaining about PRINTIT. I suggest that your problems may be solved by reading the manual. I know that there is something revolutionary about this, and that you view a program as a sort of open-ended adventure but I really must insist that you will find the answers in the manual. There is really no need for pestering me. Many, I know, regard it as a challenge to work a program without looking at a manual and others, I agree, think that the disk manual is only there to bulk up the disk. In your case, a perusal of the manual would save your time and my temper. Yours sincerely Andrew Clarke To do this, we need to write a 'letter heading' pasteup file Pentlow Mill, Cavendish, Suffolk. CO10 7SP _date_ { } Notice the curly brackets. These two brackets allow you to define where the text starts, the left margin, whrer the text ends, and the end margin. The length, in lines of the pasteup file is taken to be the page length, the number of spaces from the left to the open square brackets is taken as the left margin, the line upon which the close-square-brackets s found is taken to be the last line of text, and the column location of the bracket is taken to define the right margin. In a sense, the open brackets defines the top left corner of the text 'box' or text area, and the close curly brackets defines the bottom right corner of the box. Lets take another example:- I like to print out my program listings with the name of the file centrally at the top with the page number either at the left or the right, according to whether the page number is even or odd. I then like a solid line before the listing commences. I actually like the date at the foot of the page but I will not include the whole paste up file here, just the top. This would work perfectly well, as in he absence of the 'close curly brackets' the existing values for the right margin and footings are used. In our case, the length of the file would be 66 lines long to denote the page length (it was less for our first example because I was using a smaller paper size). We could, of course, follow up the command to load up the pasteup file by a dot command specifying the linelength (.PL). _overtype_ _lpage_ _filename_ _rpage_ _insert_ ------------------------------------------------------------------------------ { See the descriptions of the built-in macros to understand how this works. Essentially, we specify overtype mode so that we preserve the column at which all the macro substitutions take place. Then we print a line consisting of the line number on either the left or the right of the page according to whether the page number is odd or even. In the middle of the title line is the name of the file. We then print a line across the page. The next line is the next line of the file. The essential variables. When printing an ASCII (or wordstar/Newword) document, the program needs to decide on various matters. The pagelength This is the number of lines that can be printed on a page if we start right at the top and print all the way down to the bottom of the page. Normally, we assume it is 66 lines unless the program is told otherwise. You can change this value either by the dot command (.PL) or by specifying a pasteup file whose length in lines is taken to be the desired pagelength. To change the page length, you can either specify nother pasteup file, at which point the program counts the number of lines in the pasteup file and uses this value instead. Alternatively you can use the .PL command. The number following the .PL becomes the new page length. Note that if you change the linefeed value on your printer, then you will need to change this variable. The header. This is the number of lines at the top of the page which are normally skipped before we actually start printing. We allow three lines unless this is set consciously by the user to a different value. This is specified either by the dot command (.MT) or by specifying a pasteup file. The header is the number of lines in the pasteup file before the opening curly brackets are found. The line on which the open-curly-brackets is found is the first line on which text is printed. The Footing. This is the number of lines at the bottom of the page which is skipped. We usually allow five lines, but you can change this. If you wish to specify this by means of a pasteup file, you can do this by the difference between the close-curly-bracket that denotes the end of the text area, and the last line of the pasteup file, that denotes the end of the page. (the total no of lines of the pasteup file -the line on which the close-curly-brackets occurs). PRINTIT counts the number of lines between the 'close-curly- brackets' and the end of the file and uses this for the footing value. You can also specify it by means of a dot command (.MB) to specify the number of lines to skip at the bottom of the page. The Left Margin. This is the -er left margin. The number of spaces skipped at the left hand side of the page before we start printing. We can either specify it by a dot-command (.PO) or by means of a pasteup file in which the left margin is the number of columns between the left hand side and the open-curly-brackets. The Right Margin This is the number of character positions that may be printed on the page (columns) before the right margin. To change the right margin. you use a pasteup file. Printit uses the column number at which the 'close-curly-brackets' was found as the right margin. The current release of PRINTIT does not use this value very seriously In the current implementation, this value merely is a 'long-stop' preventing an attempt to type off the edge of the printer. In future versions, this is intended to implement line-wrap and right justification. These are among the parameters that can be changed to suit your printing requirements. You need not use them, they are there as a convenience for the time you feel the need to change them. I have chosen what I consider to be sensible defaults, but you may not agree with me on this. You may change these values by two means. The fonts. There are a number of fonts on the disc. These are the 'small, non-proportional fonts'. They are designed to make the best of the sort of font you would want to use for general-purpose work involving columns, charts, and so on. We are hoping, if there is enough interest, to put in proportional fonts in later releases of PRINTIT. However, we get problems from proportional fonts, because spreadsheets, charts, and so on do not line up! This is because different characters take up different amounts of space. There is the world of difference between the width of a big 'M' and a little 'i' in the character set, and the use of a non-proportional font means enormous headaches for the font designer. Because of the problems associated with proportional fonts, and the conversion of charts and spreadsheets that is required, we have left proportional fonts off this release. We rather like the non-proportional fonts we have given you. As a gimmick, our fonts are unusual ones including two that imitate modern handwriting and three that imitate mediaeval handwriting. For the technically-minded, the 'small, non-proportional' fonts are designed in a 16*8 matrix, and can be designed with an ordinary assembler. The first character is the space character, and the others follow in ASCII order. .cp 30 Merging files. There are ways of merging files. You can merge one file at a time using the '#merge' command. This command specifies the name of the file that you wish to merge into the text. Imagine that you have a nasty note to send to an account holder whose account is getting too overdue. You save his details from your accounts program using an ASCII file, consisting of the relevant details from the accounts, with each field separated by a new line. In this example, the file is called DATA. Arthur Megabyte The Old Rectory, Baxtead, Suffolk. CO13 7RG Arthur 10,345.56 You now need a form letter for occasions such as this: <<#merge data>> _overtype_ _file_line_ MML Systems Ltd, _file_line_ Pentlow Mill, _file_line_ Cavendish, _file_line_ Suffolk. _file_line_ _date_ _insert_ Dear _file_line_ Whilst we are most obliged by your continued custom with our company, we are becoming increasingly concerned with the extent to which your account has become overdue. The sum of _file_line_ is not inconsiderable, and would set even the listening bank whistling through their teeth. You early payment would be greatly appreciated. Looking forward to hearing that the cheque is in the post Yours sincerely Andrew Clarke. After having gone through PRINTIT, this will become:- Arthur Megabyte MML Systems Ltd, The Old Rectory, Pentlow Mill, Baxtead, Cavendish, Suffolk. Suffolk. CO13 7RG 10:42 am, 12/3/87 Dear Arthur Whilst we are most obliged by your continued custom with our company, we are becoming increasingly concerned with the extent to which your account has become overdue. The sum of 10,345.56 is not inconsiderable, and would set even the listening bank whistling through their teeth. You early payment would be greatly appreciated. Looking forward to hearing that the cheque is in the post Yours sincerely Andrew Clarke. The current release does not support repeated merging in order to do a batch of disc labels, but it is possible to do the job another way with a pasteup file. (see the full user guide for details.) .cp 30 Other techniques: It is a good idea to use batch files or, with CP/M submit files. Unfortunately, we cannot divine how you, as the end user, wish to lay out your text, and the size of paper that you wish to use. This means that you will, inevitably, be dissatisfied with the default values that we supply for you. Once you have worked out all the dot commands, macros, and switch settings that you like, then you can put them in a file that is included with what you wish to print. (using the <<#include xxx>> command). You can do most things from the command line, and it is rare to need to insert much into the file itself. Typing switches that are apparently meaningless is boring and prone to confusion, so, as soon as you know what switches you need, PUT THEM IN A BATCH FILE. Another useful technique is the redirection file. If, on the command line, you specify an input redirection file eg PRINTIT test.10 >datafile then you can feed the file (datafile in this case) into printit as if the file had been type from the keyboard. Each line in the file is equivalent to a line typed in at the keyboard. The judicious use of the _input_ macro and the #input command allow automatic input of data from your favourite database. The #merge command provides another way of doing this. .cp 40 Appendix In NLQ mode, using the standard fonts, you will get 127 characters to the line. You can specify different line heights. The actual height of the characters is:- 1/7th inch. When PRINTIT starts out, it has certain default values, all of which can be changed to suit your particular job. The defaults of Printit are as follows. the default radix for radix is 16 (Hexadecimal). The name for the output file is OUTPUT.FIL. Macros are not printed at the end of the file. We do not send output to the console. We do not send the name of the current file and parameters to the console; We insert macro substitutions rather than overtype them; We allow, and act on macros when they are macro substitutions; The file is printed on an Epson printer in NLQ mode We do not ignore macros altogether The prompt for user-input is "Type something, please"; The length of each page is 66 lines; We print every page; The number of lines printed per page is 58; The number of lines in the header is 3; We make the page number that we print out, page 1; The right margin is column 120; The left margin is column 0;