PDP-11 RUNOFF 11-MAR-81 PDP-11 RUNOFF ------------- Original Author: L. Wade Revision Date: 2 June 77 Program Version: Reese1 Reese Modifications by F. Borger NOTICE: This memorandum describes a program which Digital Equipment Cor poration has no committment to offer or support at  this time. This memorandum is, however, believed to b e an accu- rate description of RUNOFF.  This version of RUNOFF has been significantly modified at Micha- el Reese Medical Center. Be advised th at significant differ- ences occur between this v ersion of RUNOFF and any of the pro- fligate DEC versions currently available.  The experienced RUNOFF user will also find of interest two other programs on the current system. RNP is a runo ff pre-processor which has the capability of merg-  ing standard runoff sources with optional input either from sec- ondary input  files or from the terminal. It is especially use- ful for generating form letters and memos, etc. TWOPAGE is a BASIC program which lets y ou split runoff output into two files, with succe ssive pages in alternate files. The two files tha n can be printed at the Centronics line printer or the Diablo letter quality  printer to produce documents printed on both sides of the paper. PDP-11 RUNOFF PAGE 2 11-MAR-81 TABLE OF CONTENTS CHAPTER 1 INTRODUCTION. . . . . . . . . . . . . . . . . .1-1 1.1 INTRODUCTION . . . . . . . . . . . . . . . .1-1 1.2 ON-LINE OPERATION. . . . . . . . . . . . . .1-1 1.3 INITIATING RUNOFF. . . . . . . . . . . . . .1-1 1.4 DEFAULT FILE SPECIFICATIONS . . . . . . . .1-1 1.5 OUTPUT FILE SWITCHES . . . . . . . . . . . .1-1 CHAPTER 2 SOURCE FILE FORMAT. . . . . . . . . . . . . . .2-1 2.1 CASE INFORMATION . . . . . . . . . . . . . .2-2 2.2 SPECIAL CHARACTERS . . . . . . . . . . . . .2-3 CHAPTER 3 COMMANDS. . . . . . . . . . . . . . . . . . . .3-1 3.1 FORMATTING . . . . . . . . . . . . . . . . .3-2 3.1.1 .BREAK [BR] . . . . . . . . . . . . . . .3-2 3.1.2 .SKIP [S] [SL] n. . . . . . . . . . . . .3-2 3.1.3 .BLANK [B] n. . . . . . . . . . . . . . .3-2 3.1.4 .FIGURE [FG] n. . . . . . . . . . . . . .3-2 3.1.5 .INDENT [ID] [I] n. . . . . . . . . . . .3-2 3.1.6 .WIDEINDENT [WD] n. . . . . . . . . . . .3-3 3.1.7 .PARAGRAPH [PP] [P] n . . . . . . . . . .3-3 3.1.8 .AUTOPARAGRAPH [AP] . . . . . . . . . . .3-3 3.1.9 .NO AUTOPARAGRAPH [NAP] . . . . . . . . .3-3 3.1.10 .NOTE [NT] . . . . . . . . . . . . . . .3-3 3.1.11 .END NOTE [EN] . . . . . . . . . . . . .3-4 3.1.12 .HEADERLEVEL [HL] N XXXXXXXXX. . . . . .3-4 3.1.13 .LISTELEMENT [LE] XXXXXXXXX. . . . . . .3-4 3.1.14 .LIST N. . . . . . . . . . . . . . . . .3-5 3.1.15 .END LIST. . . . . . . . . . . . . . . .3-5 3.2 PAGE MANIPULATION. . . . . . . . . . . . . .3-6 3.2.1 .HEADER [HD] (UPPER,MIXED,LOWER). . . . .3-6 3.2.2 .NO HEADER [NHD]. . . . . . . . . . . . .3-6 3.2.3 .CHAPTER [CH] XXXXXXXX. . . . . . . . . .3-6 3.2.4 .NUMBER CHAPTER n . . . . . . . . . . . .3-6 3.2.5 .APPENDIX [AX] XXXXXXXX . . . . . . . . .3-7 3.2.6 .NUMBER APPENDIX x. . . . . . . . . . . .3-7 3.2.7 .TITLE tttt ... tttt. . . . . . . . . . .3-7 3.2.8 .SUBTITLE [ST] tttt ... tttt. . . . . . .3-7 3.2.9 .DATE [DT] [D] xxxxxxxxx. . . . . . . . .3-7 3.2.10 .PAGE [PG] . . . . . . . . . . . . . . .3-7 3.2.11 .SUBPAGE [SB]. . . . . . . . . . . . . .3-8 3.2.12 .SET SUBPAGE [SS]. . . . . . . . . . . .3-8 3.2.13 .END SUBPAGE [ES]. . . . . . . . . . . .3-8 3.2.14 .TEST PAGE [TP] n. . . . . . . . . . . .3-8 3.2.15 .NUMBER [NM] n . . . . . . . . . . . . .3-8 3.2.16 .NONUMBER [NNM]. . . . . . . . . . . . .3-8 3.3 MODE SETTING . . . . . . . . . . . . . . . .3-9 3.3.1 .LOWER CASE [LC]. . . . . . . . . . . . .3-9 3.3.2 .UPPER CASE [UC]. . . . . . . . . . . . .3-9 3.3.3 .JUSTIFY [J]. . . . . . . . . . . . . . .3-9 3.3.4 .NOJUSTIFY [NJ] . . . . . . . . . . . . .3-9 PDP-11 RUNOFF PAGE 3 11-MAR-81 3.3.5 .FILL [F] . . . . . . . . . . . . . . . .3-9 3.3.6 .NOFILL [NF]. . . . . . . . . . . . . . .3-10 3.4 PARAMETER SETTING. . . . . . . . . . . . . .3-11 3.4.1 .LEFT MARGIN [LM] n . . . . . . . . . . .3-11 3.4.2 .RIGHT MARGIN [RM] n. . . . . . . . . . .3-11 3.4.3 .LEFT HEADER [LH] n . . . . . . . . . . .3-11 3.4.4 .RIGHT HEADER [RH] n. . . . . . . . . . .3-11 3.4.5 .SPACING [LS] n . . . . . . . . . . . . .3-12 3.4.6 .PAPER SIZE [PAGE SIZE] [PS] n,m. . . . .3-12 3.4.7 .TAB STOPS [TS] n ... n . . . . . . . . .3-12 3.5 MISCELLANEOUS. . . . . . . . . . . . . . . .3-13 3.5.1 .COMMENT [COM] [;] XXXXXXXX . . . . . . .3-13 3.5.2 .CENTER [CN] [C] n. . . . . . . . . . . .3-13 3.5.3 .WIDECENTER [WC] n. . . . . . . . . . . .3-13 3.5.4 .PERIOD [PR]. . . . . . . . . . . . . . .3-13 3.5.5 .NO PERIOD [NPR]. . . . . . . . . . . . .3-13 3.5.6 .STANDARD [SD]. . . . . . . . . . . . . .3-14 3.5.7 .FLAGS [FL] XXXXXXXX. . . . . . . . . . .3-14 3.5.8 .NO FLAGS XXXXXXXX. . . . . . . . . . . .3-14 3.5.9 .NFL. . . . . . . . . . . . . . . . . . .3-14 3.5.10 .FOOTNOTE [FN] n . . . . . . . . . . . .3-14 3.5.11 .INDEX [X] tttt ... tttt . . . . . . . .3-15 3.5.12 .PRINT INDEX [PX]. . . . . . . . . . . .3-15 APPENDIX A RNO ERROR MESSAGES . . . . . . . . . . . . . .A-1 APPENDIX B SPECIAL CHARACTERS . . . . . . . . . . . . . .B-1 APPENDIX C INDEX. . . . . . . . . . . . . . . . . . . . .C-1 11-MAR-81 CHAPTER 1 INTRODUCTION 1.1 INTRODUCTION RUNOFF is a PDP-11 program running under RSX to facilitate the  preparation of typed or printed manuscripts, such as m emos, man-  uals, etc. The user prepares his material on any regu lar PDP-11 terminal, and writes it onto a file using EDIT11. The user in- cludes not only textual ma terial, but also case and formatting information.  RUNOFF then takes the file and reproduces it onto  the line printer, teletype or other file to produce a  final copy  or final file image. It performs the formatting and c ase shift- ing as direct ed, and will also perform line justification, page numbering and titling, etc., as desired. The principal benefit of s uch a program is that files prepared for use with it may be edited and corre cted easily. Small or  large amounts of material may be added or deleted, and unchanged material need not be retyped. After a set of changes, the pro- gram may be operated to produce a new copy which is  properly paged and formatted. Docu mentation may thus be updated as ne- cessary without requiring extensive retyping. 1.2 ON-LINE OPERATION RUNOFF is a program much l ike most PDP-11 RSX system programs. It is accesse d by the usual "MCR" command "MCR>RNO --- " to the monitor. RSX Runoff uses the GCML M ACRO with a specified indirect depth of two, and therefore, all specifications regarding  INDIRECT Files are applicable. INTRODUCTION 11-MAR-81 1.3 INITIATING RUNOFF Command line formats: MCR>AOUTFILE/SW=INFILE/SWB 1.4 DEFAULT FILE SPECIFICATIONS Input: SY:RUNOFF.RNO Output: SY:RUNOFF.DOC 1.5 OUTPUT FILE SWITCHES The following (output) switches are recognized: /-SP ----- Inhibit spooling of output file /SP:XXn -- Spool to device "XXn:" /CO:n ---- Make n copies (/SP:XXn switch required) /FO:n ---- Set forms type (/SP:XXn switch required) /UC ------ Forces ALL uppercase output /FF ------ Force Form-feeds (instead of multi-LFs) /WA ------ Wait for CR input at beginning of each page /PA:L:H -- Output only indicated PAGE range /CH:L:H -- Output only indicated CHAPTER range /UL:B ---- Underline with a spacing-backspace /UL:C ---- Underline with a non-spacing-backspace /UL:L ---- Underline via line overprint /UL:N ---- Underlining suppressed (default case) /LS ------ Allow CENTRONICS wide characters on output /-HY ----- Disable HYPHENATION (Default is ENABLED) /SC ------ Enable DIABLO special characters 11-MAR-81 CHAPTER 2 SOURCE FILE FORMAT As stated above, the sourc e file contains the textual material  which will appear on the final copy, plus information  to specify formatting.  Most importantly, upper and lower case information may also be supplied so th at copy can be prepared on the tele- type or other such device which can nor mally input only upper  case letters. All command information consists of reg ular ASCII printing char acters so that a listing of the source file may be examined if the final copy is not exactly as desired. All material in the source file is taken to be source text ex-  cept those lines beginning with a period. A line begi nning with  a period is assumed to be a command, and must match on e of those listed below. The commands provide the formatting information, and control various optional modes of operation. Usually the text is filled and justified as it is pr ocessed. That is, the program FILLS a line by adding successi ve words from the source text until one more word would cause the right margin to be  exceeded. The line is then JUSTIFIED by inserting extra spaces  in the text until the right margin is reached. If the /SC switch has been applied (See 2.2 special cha rcters,) justification is done by altering the character pitc h of the printer, producing a better quality output. The user may  occasionally wish to reproduce the source text ex- actly, which is done by disabling FILLING and JUSTIF ICATION. The program may be set to FILL but not  JUSTIFY, in which case the output will be normal  except that lines will not be justi-  fied to the right margin. The program may also be set to JUSTI- FY but not FILL, although  this would probably produce peculiar results and is not recommended. When the FILL mode is on, spaces and carriage returns occurring in the source text are treated only as word separators. Multiple separators are ignored.  Some of the commands cause a BREAK in the output. A B REAK means that the current line is o utput without justification, and the next word goes at the begi nning of the next line. This occurs SOURCE FILE FORMAT PAGE 2-2 11-MAR-81 at the end of paragraphs. THE output file will be CHAPTER and PAGE based. The program will advance to new pages as necessary, placing The title (if given) and th e page number at the first line of each page. The Subtitle (if given) and Date (if specified) are give n on the second line of each page. The user may explicitly call for a page or chapter advance wh ere desired, and may inhibit the oc- currance of a page advance within specified material. 2.1 CASE INFORMATION  Specification of case for files prepared on the telety pe is done with two characters, up-ar row (^, shift-N), and back-slash (\,  shift-L). The appearance of an up-arrow causes the le tter imme- diately follo wing to be transmitted in upper case. The appear- ance of a bac k-slash causes the letter immediately following to be converted  to lower case. Any letter not preceeded by one of these characters is transm itted in the current mode. The mode  is initially lower case, and is changed by the occurra nce of two successive case control characters. Tw o up-arrows (^^) cause the mode to be set to upper case, and two back-slashes (\\) cause the mode to be set to lower case. The use of the above corresponds to the use of the s hift and shift-lock keys on a typewriter. Usually, typing ap pears in lower case.  To type one letter in upper case, the shift key is used. The shift-lock is set to type a series of upper case letters, after which it is released. In addition, the less-than (<) character causes subsequent conversion to upper case until a word terminator (space, quoted space, CR or  TAB) character occurs, effectivly capitalizing the following word. The following shows the uses of the case control characters: