.CH INTRODUCTION to the commands .P When you first use RUNOFF, the wealth of available commands may seem confusing, but you will find this wealth can be used to speed the creation of documents. The first thing you should learn is how to create simple documents such as letters. For this you will need the following commands: .LIST 0 .list element _.RIGHT MARGIN sets the right margin. .LE;_.LEFT MARGIN sets the left margin. .LE;_.TOP MARGIN sets the top margin. .LE;_.PAGE SIZE combines all the above, and sets the page length. This command should always be used if you wish to produce documents with numbered pages. .LE;_.PARAGRAPH starts paragraphs. .LE;_.CENTER centers a line of text. .LE;_.RIGHT right justifies a line of text. .LE;_.INDENT indents the next line. .LE;_.SPACING sets the spacing to single, double, triple _.... .LE;_.HALF SPACING enables in-between spacing such as 1_&1/2, 2_&1/2 _.... (Only works on some printers.) .LE;_.SKIP skips a line (or 2, if double spacing, 3 etc.) In other words, it skips lines according to the spacing selected. .LE;_.BLANK skips multiple lines independent of spacing. .LE;_.FIGURE or _.FIGURE DEFERRED reserves n lines, independent of spacing, for inserting drawings, or other artwork later. .le;_.BREAK starts a new line. This is called breaking the text. .LE;_.PAGE starts a new page. .le;_.FILL automatically fills each line with words until no more will fit. .le;_.JUSTIFY pads the text with spaces so that each line is justified at the right margin. .le;_.AUTOHYPHENATE causes long words at the end of a line to be automatically hyphenated. .end list 0 .p The task of setting up paragraphs can be simplified by using the _.AUTOPARAGRAPH command. Once this command has been given, any line preceded by a blank, tab, or a blank line automatically starts a new paragraph. When this command is used, the input text can be formatted to "look" like the final document. The _.SET PARAGRAPH command can be used in conjunction with the _.AUTOPARAGRAPH to control the format of each paragraph. .TP 12 .p A frequently asked question is: How do I do bibliographies or tables? This can be done by setting up a negative indentation and adding the same indentation to the left margin. As a result, every time you begin a paragraph, the line will start on the old left margin, and the text will be indented. .LEFT MARGIN +7.s.rm -2 .s.i-2;^&EXAMPLE: the input\& .s.literal .left margin +5. set paragraph -5 .p;_.SET PARAGRAPH [-indent],[-skip],[test page] .BR;sets the format produced by the _.PARAGRAPH command, the _.AUTOPARAGRAPH, or _.AUTOTABLE feature. The indentation can be either positive or negative. .el .s.i-2;^&produces the following text\& .s.i-5; _.SET PARAGRAPH [-indent],[-skip],[test page] .BR;sets the format produced by the _.PARAGRAPH command, the _.AUTOPARAGRAPH, or _.AUTOTABLE feature. The indentation can be either positive or negative. .ps .p You can control the overall look of the pages with the _.HEADER, _.LAYOUT, and _.TITLE/.SUBTITLE commands. The default page format is to place a title, subtitle, and page number at the top of the page. The location of the title/subtitle and the page number can be varied using the _.LAYOUT command, which allows 17 different placements. The title and subtitle can be specified by the _.TITLE or _.SUBTITLE command. If no title is specified, none appears. The _.NO TITLE command will suppress both the title and subtitle without suppressing the page number. The _.NO HEADER command, on the other hand, will suppress title,subtitle, and page number. The _.DISABLE NUMBERING command will suppress the page number without affecting the title/subtitle. Normally the page number is preceded by the word "Page". To display only a number with no extra word, use the _.DISPLAY NUMBER command. The _.DISPLAY NUMBER command can be used to substitute some other text for the word "Page", and can be used to add extra text after the page number. For example, _.DISPLAY NUMBER could be used to number the pages of a 4 page document as 1/4,2/4,3/4,4/4. The _.DISPLAY command can be used to switch page numbers to other forms. Normally the first page of a document will not have the title/subtitle printed on it. This can be changed with the _.FIRST TITLE command. .p A common problem with formatting text is deciding how to arrange it on each page. For example, you may wish to force a particular section of text to fall all on the same page rather than have it possibly be split between 2 pages. This can be achieved using the _.TEXT and _.END TEXT commands. An alternate way to guarantee a fixed number of lines all on the same page is to use the _.TEST TEXT command or the _.TEST PAGE command. You should be aware that the _.PARAGRAPH command has an automatic _.TEST TEXT built into it. .p You may wish to reserve part of a page for a figure with a caption. This is easily achieved with the _.TEXT DEFERRED and _.END TEXT commands. If there is not enough space on the current page for the text between these commands, the text will be stored and reproduced on the next page that has enough space. You can reserve a whole page by using _.TEXT DEFERRED and _.PAGE to complete the reserved text. Several captioned figures can be generated and mixed with text in this way without without leaving partial pages blank. .p After you are able to format a letter or simple few page document, you will want to learn more advanced techniques. If you need to produce lists, such as the list above of simple commands, you can use the commands _.LIST, _.LIST ELEMENT, and _.END LIST. These commands make creation and modification of lists simple and perhaps even enjoyable. .ls 0 .LE;_.LIST is used to begin a list. .LE;_.LIST ELEMENT starts each entry in the list. To insert more entries in the list, you need only insert a new _.LIST ELEMENT command with the added text, and the list will be appropriately numbered. .LE;_.END LIST terminates the list. .END LIST 0 If you need to produce lists preceded by Roman numerals or letters rather than numbers the _.DISPLAY ELEMENTS command allows you to change the list format. .p If you are dealing with a large document, you should consider breaking it up into sections. A master file for creating the entire document can be created using a _.REQUIRE "filename" command to include each of the sections of the document. You could reshuffle the order of the various sections latter simply by rearranging the order of the _.REQUIRE statements in the master file. Whenever a document is to be longer than a single page, you should consider breaking it up into sections. .p You can also divide a large document into chapters and appendices with the _.CHAPTER and _.APPENDIX commands. These commands automatically format the beginning of each chapter or appendix in an identical fashion and cause the chapters to be numbered in the order in which they occur. If you later need to insert a new chapter, the chapters are automatically renumbered. The "look" of the chapters can be modified by the _.STYLE CHAPTER command. This command sets up the margins and placement of the chapter number and title. For some documents might want to have the page number placed in different locations depending on whether or not the current page is the first page of a chapter. The _.CHAPTER LAYOUT command can be used to control the layout of the first page of each chapter independently of subsequent pages. _.DISPLAY CHAPTER and _.DISPLAY APPENDIX can be used to select either letters, roman numerals, or normal Arabic numerals for numbering the chapters and appendices. Whenever a document is chapter oriented, the page numbers are printed as chapter-page. For example, the 5th page in chapter 2 would be numbered 2-5. If sequential page numbering without the chapter numbers is desired, then _.DISABLE NUMBERING CHAPTER should be used. .p In addition to (or instead of) dividing a document into chapters, it may be necessary to divide it into sections of text that are headed by a section number followed by a title. A section number is a string of numbers separated by periods. For example, 3.2.5 or 1.2. A string of 3 numbers is called a third header level, 2 numbers a second and 1 the first. You can automatically generate headers with the _.HEADER LEVEL command. This command allows you to easily insert additional sections because RUNOFF will automatically renumber the remaining sections correctly. Headers can be reformatted with the _.STYLE HEADERS command, which controls the spacing and placement of the headers. In addition, the _.INDENT LEVELS command indents the left and right margins of the headers as desired. If you need to use letters or Roman numerals instead of normal decimal numbers, you can use the _.DISPLAY LEVELS command to change the type of numeral. .p You may want to have the sections of a document defined in outline form. That is, instead of numbering sections a.b.c... you wish to use large letters for level 1, numbers for level 2, and small letters for level 3. This can be accomplished with the _.STYLE HEADERS and _.DISPLAY LEVELS commands. The STYLE command can be used to suppress the a.b.c form of numbering and the DISPLAY command can be used to specify the numbering format. In addition, the section title can be centered, underlined, and capitalized automatically. .P The next page number or chapter number can be assigned with the _.NUMBER commands. Subpage numbering can also be performed. Subpage numbering allows extra pages to be inserted without having to reformat and reprint the whole document. For example, after page 12 you could insert subpages 12A, 12B, and 12C by using the _.SUBPAGE and _.END SUBPAGE commands. The actual subpage number can be specified with the _.NUMBER SUBPAGE command. The _.NUMBER commands can be used to skip page numbers. It is also possible to format only selected pages and chapters by using the .if RT /C, /A, and /P .else RT /CHAPTER, /APPENDIX, and /PAGES .endif RT options. .p If you need to reproduce your document in in book form with both sides of the paper printed, there are several commands to aid you. The _.ENABLE ODD command forces the first page of each chapter onto an odd numbered page. _.PAGE ODD or _.PAGE EVEN can be used to pick which page you wish to have next. In addition, you can select only odd or even page output with the .if rt /O or /E .else RT /ODD or /EVEN .endiF RT options. By splitting your document into odd and even pages you can first print out the odd pages, then reinsert the paper and print the even pages on the other side of the paper. The .if rt /R .else RT /RIGHT .endif RT option can be used to move the text over to account for an extra binding margin. .p Text can be underlined by using the underline flag. Underlining is affected by the _.FLAGS UNDERLINE, _.ENABLE UNDERLINING and _.DISABLE UNDERLINING commands. Normally only printable characters are underlined; the space character is not normally underlined. To cause it (or any other non-underlined character) to be underlined, you can use the _.UNDERLINE command to define it as underlinable. Likewise, if you never want to underline certain characters, such as punctuation or numbers, you can define them not underlinable with the _.NO UNDERLINE command. .p A whole cornucopia (or Pandoras box) of additional features can be controlled with the _.FLAGS commands. These commands allow you to enable and redefine special symbols to perform various functions such as underlining, capitalization, hyphenation, overstriking, breaking, and substituting. The _.ENABLE or _.DISABLE commands let you control when these features are used. (See the section on SPECIAL CHARACTERS.) Most of these features are self explanatory. Three of them are worth mentioning here. .LIST 0 .LE;OVERSTRIKING is where more than one symbol is printed at the same spot. For example, overstriking an oh "O" with a minus sign "-" can produce the Greek letter theta. .LE; BREAK is a special way of telling RUNOFF where it may break a line as opposed to hyphenating it. It is also used to control tabulation. (See also the AUTOBREAK command.) .LE;SUBSTITUTION allows abbreviations to be defined for long or commonly used lines of text, numbers, or symbols. Substitution can be used to create complex symbols that can be printed on special line printers. See _.DEFINE SUBSTITUTE, _.RESET SUBSTITUTE, _.FLAGS SUBSTITUTE, and _.ENABLE SUBSTITUTION .end list 0 .p If you need to number various items in the text, such as footnote numbers, figure numbers, table numbers, and equation numbers, you can set up such numbers and increment them with the _.DEFINE ITEM and _.NUMBER ITEM commands. You can also set up substitution labels for various reference numbers such as a chapter, section, appendix, or item number with the _.DEFINE NUMBER commands. .p Typing a table in column format can be onerous task, even with the tab stops on a typewriter. RUNOFF contains tab stops that are settable by the _.TAB STOPS and _.TAB PROPORTIONAL commands. In addition, you can right justify columns or even center justify columns using the _.TAB STOPS command. The _.AUTOBREAK command will allow you align columns of numbers along the decimal point. (see the TAB command for examples.) Items can be connected by ellipses to guide the eye. The _.ELLIPSES command will cause ellipses rather than spaces to appear whenever you tab to the next item. .p RUNOFF can automatically take care of footnotes. The _.FOOTNOTE command allows you to type the footnote at the same point it is referenced, but have it appear at the bottom of the page. RUNOFF can also produce an index and a table of contents for your document. .p Finally, a few special features should be mentioned that may be available if you have a word processing style printer: .list 0 .LE;EQUATION FORMATTING allows you to easily format equations to be typed equations on the printer. .LE;VARIABLE SPACING improves the look of the output when you right justify the text by balancing the white space throughout the line. .els 0 .p Since this version of RUNOFF is almost the same as Digital Standard Runoff (DSR), the DSR manual can be used as a guide to most of the basic features. However, many advanced features in this version are not available in either DSR or any other version of RUNOFF. VAX/VMS users may prefer this version to DSR because of the extra features available for customizing documents. For those who use VAX/VMS and either RSX, RT, or IAS, this version of RUNOFF is particularly convenient because it runs essentially transparently on all these systems. (DEC does not support RUNOFF or DSR on RSX, RT, or IAS, so users of these systems have no other choice but to use one of the versions of RUNOFF available through DECUS.)