Í ÊC H A P T E R S E V E Nê Ê7 The FORMAT Utilityê ÊFormatê :ÉFORMAT é The FORMAT program takes the given source file and formats it according to the given selector. FORMAT is a very powerful program which can be used to produce high quality documents. FORMAT makes use of imbedded commands. These commands are double letter words prefixed by a dot ("."). They tell the program to perform certain operations on the following text. The invocation selectors accepted are:- &A - Source file is true ASCII, causes FORMAT to read it as such. &W - Use WYSIWYG output. Simulate printer typefaces on screen. &P - Activate printer output &v - Deactivate VDU output. &L - Load PCC Data File (See later). Ê7.1 FORMAT Dot Commandsê ÊSyntaxê :.ch "" {FF -} FORMAT will automatically underline and centre chapter headings when it finds them. It will also make a note of the page number and produce a contents table at the end of the text. In order for these operations to be carried out correctly, FORMAT must be told when a chapter heading occurs. The chapter number should be given after the heading. Remember that the double quote character (") is not displayed as such by EDTEXT or any other program. FORMAT will, however, honour the converted character. If the word "FF" is appended to the line instead of the "-", FORMAT will cause a Form Feed to be output before the chapter heading. Setting the chapter number will cause subsequent section numbers to be correctly numbered. FORMAT will automatically insert the PCCs to cause the heading to appear underlined. The .ch command does not automatically isolate the chapter heading. If you wish a gap around the heading when not using the "FF" option, then you must make the gap in the source text eg; É<....some...text...>é É.ch etc.é É<....more...text...>é ÊSyntaxê :.{ Indicates the start of a paragraph. Text within a paragraph is affected by the current format settings. Text outside is left largely unaltered. the { command also causes indentation, if a value has been specified with the .pi command. ÊSyntaxê : .} Indicates the end of a paragraph. Text after this command will not be altered except to fit the current margin settings. ÊSyntaxê :.nl Format stores each word in a buffer which it prints when the buffer becomes full. This command causes the contents of the buffer to be output followed by a carriage return and line feed. ÊSyntaxê :.el Causes the contents of the buffer to be output followed by a carriage return and line feed. If the buffer is empty then no action is taken. ÊSyntaxê :.pm {SKIP WAIT IGNORE} Sets the paging mode. When FORMAT reaches the end of a sheet of paper it has a choice of ignoring the fact, skipping over the perforations or waiting for the user to sort things out. The .pm command allows the user to set the required option. ÊSyntaxê :.pn {- TOP BOTTOM} Sets the value for the next page number and the position it is to be printed at. The dash indicates that no page numbers are required from now on. Page numbers are displayed in the form:- É< >é eg; É< 5 >é The number is also isolated by blank lines both above and below. These blank lines have the affect of forcing a "half skip" when the perforation setting is IGNORE. ÊSyntaxê :.sh "" This command is provided for the same reason as the .ch command. It operates in a similar way except that a section depth value must be specified. For a first section this value is 1 ie; É1.1 First Sectioné For a subsection the value is two ie; É1.1.1 Subsectioné Note that, like .ch, you must isolate section headings in the source text if you want them to be isolated in the final document. ÊSyntaxê :.fl Allows the user to tell FORMAT of the current number of linesÓÉPrintable on aÓsingle sheeté note that this value is Ênotê the Óform-length. FORMAT will decideÓ the true form-length by calculating the number of lines "lost" to page numbers and perforation gaps. ÊSyntaxê :.ls Sets the number of times the printer moves down after printing a line of text. A line spacing of two is recommended if the document is to be submitted for critical appraisal as it allows comments to be written between the lines. ÊSyntaxê :.ct "" Centres the given text within the current margin settings. ÊSyntaxê :.rt "" Prints the given text against the right edge of the paper. ÊSyntaxê:.nc Disables output of contents list. ÊSyntaxê :.lm [+] Allows the user to adjust the current setting for the left margin. The "+" option allows the user to specify a relative offset-positive or negative. ÊSyntaxê :.rm [+] Allows the user to adjust the right margin. See above for details. ÊSyntaxê :.ju {ON OFF} Controls automatic text justification. The ON and OFF options are fairly self explanatory. Remember that text outside a paragraph is not justified anyway. ÊSyntaxê :.ff Instructs FORMAT to terminate the current page and skip forward to the start of the next sheet. The page numbers will, of course, still be printed correctly. ÊSyntaxê :.fw [+] Allows the user to set the width of paper between the two margins. FORMAT will automatically centre the page of text. The "+" option allows the user to specify a relative size change. ÊSyntaxê :.da "{ -}" Causes FORMAT to evaluate the date expression-if given-and to insert the literal result into the text. The resulting text will still be justified if applicable. If `-' is given then the current date will be inserted into the text, eg; .da "-" ÊSyntaxê :.ti Causes FORMAT to insert the current time into the text which will still be justified if applicable. ÊSyntaxê :.ip "" Instructs FORMAT to fetch a section of text from the user-in response to the prompt-and incorporate the result into the text. As with .da and .ti the result will be justified if applicable. ÊSyntaxê :.in "" [FF] Instructs FORMAT to break off reading the current source file. FORMAT will then attempt to read the contents of the given file. The given file can, itself, contain further .ip commands, but such nesting is only allowed up to a maximum of ten suspended files. Provided no more than ten files are suspended at any one time, there is no limit to the number of .ip commands you can use. When the end of a file is reached, FORMAT will return to the last suspended file at a point after the .ip command. The "FF" directive instructs FORMAT to issue a form feed before continuing printing. ÊSyntaxê :.vc {START STOP} Instructs FORMAT to buffer the text in between the START and STOP options. When the buffer is full (or when the STOP option is invoked) the text will be vertically centred. ÊSyntaxê :.pi Allows the user to set the number of spaces used to indent a paragraph when the .{ command is invoked. ÊSyntaxê :.go This command MUST be used to start text output. ÊSyntaxê :.pr > Outputs the given list of PCC codes. The list can be terminated by any none valid PCC or by the end of a line. This option should be used to send codes to the printer to initialise it before printing starts. Ê7.2 Default Settingsê Format initialises to a standard document printing status. This status can be used to print any report or large document. It is recommended, however, that users set up ALL initial conditions themselves. PAGE LENGTH : A4 / 70 PAGE WIDTH : 60 PERFORATION MODE : SKIP PAGE NUMBERS : TOP (1+) Ê7.3 PCC Data Filesê These define the specific values to be sent to the printer when each PCC is encountered. The default setting is for NULL codes, ie; no codes are sent. These default values will produce DRAFT output. The code should be given in the following pattern:- > > - An example could be:- K 27 45 1 - Which would set up the underline ON option for EPSON printers.Õ $ÿÿ ÊC H A P T E R S E V E Nê Ê7 The FORMAT Utilityê ÊFormatê :ÉFORMAT é The F