.STYLE HEADERS 7,1,,1,1,1,1 .!run-in starts at level 7 (no run-in) .PAGE SIZE 58,80 .!the default page size 58 lines, 60 chars wide .LEFT MARGIN 5 .RIGHT MARGIN 80 .SET PARAGRAPH 3 .!indent 3 characters for paragaphs .AUTOPARAGRAPH .FLAGS BOLD .FLAGS UNDERLINE .! start of text .literal +-------------------------+ | HUGHES AIRCRAFT COMPANY | +-------------------------+ INTERDEPARTMENTAL CORRESPONDENCE TO: Distribution cc: DATE: 11/25/85 ORG: REF: SUBJECT: RUNOFF preprocessors Update FROM: P. R. Bjorndahl ORG: 74-25-38 BLDG: E52 MS: C236 LOC: EO EXT: 62635 _______________________________________________________________________ .el .enable bar .begin bar This is an update to the IDC on RUNOFF Preprocessors dated 12/17/82, the differences are indicated by the change bars. .end bar .hl1 Indenting paragraph headers In some documents that you generate using RUNOFF, you want the paragraph headers to be indented further to the left then the paragraphs themselves. There is no easy way to tell RUNOFF to do this for you. You must set the left margins before and after each .HL line. Instead of doing this by hand, there is a program called INDENT which will do this for you. Use INDENT on your .RNO file, INDENT will insert the runoff command .LM 5 before each line starting with .hl or .HL and insert the runoff command .LM 10 after each such line. If the line immediately before the .hl or .HL line starts with .LM or .lm. The insertion will not be made, it assumes the left margins have been set already. So it is possible to run your document through INDENT multiple times without worrying that it will insert the commands more than necessary. To run INDENT, type INDENT, and the program will prompt for the input and output files. You may use the same file names for both input and output. Wild cards can not be used. .page .title Generating Figure and Table Numbers .hl1 Generating figure and table numbers If you use figures and/or tables in your documents, there is no way in RUNOFF to know the figure or table numbers before you runoff the document. Of course you may insert them by hand, but you may also use the program FIG. To run FIG, type FIG, and the program will prompt for the input file name. Or you can type FIG filename on the same line. The input file is supposed to have the .PRE extension, and the .PRE extension need not be entered. The program FIG does the following things: .ls .le;Allows you to refer to a figure or table number that has been defined in the current paragraph and only referred to in that paragraph. .le;Allows you to refer to a figure or table number that is defined in the document from ^*anywhere\* in the document. .le;Choose the format of display for the figure or number. .b .ls0 .dle "(",LL,")" .le;You may prefix the figure or table number with the paragraph number or have the figures or tables numbered sequentially from 1 to n throughout the document. .le;You may also specify the figure or table numbers to be displayed in Decimal (default), Roman Upper case, Roman Lower case, Letter Upper case or Letter Lower case. .els0 .le;Create a list of figures and list of tables which can be inserted in the table of contents. .begin bar .le;Allows you to refer to the current paragraph or section number in that paragraph or section. (The terms Section and Paragraph are used interchangeably) .le;Allows you to refer to a paragraph number that is defined in the document from anywhere in the document. .le;The ".REQUIRE" command is now fully implemented with no practical nesting limit. .end bar .els .note Same as RUNOFF, the program FIG accepts both upper and lower case commands. And the commands which starts with a .! pair must start in column 1. .end note .page .subtitle .autosubtitle 2 .hl2 Table and figure numbering formats The numbering for figures and tables are independent of each other. To prefix figure numbers or table numbers with the paragraph number is the default. The figure or table numbers are separated from the paragraph number by a dash (-), and the numbers are initialized at 1 in each paragraph. The sequential numbering for figures and tables will start at 1 and will be incremented by 1 for each new table or figure. To invoke the sequential figure numbering, put the following line in the beginning of your document: .b _.!FIGURE SEQUENTIAL To invoke the sequential table numbering, put the following line in the beginning of your document: .b _.!TABLE SEQUENTIAL The default display format for figure and table numbers is decimal. To display have the figure numbers differently, put one of the following lines in the beginning of your document: .b .br;_.!DISPLAY FIGURE D (default) .br;_.!DISPLAY FIGURE RU (for Roman Upper case) .br;_.!DISPLAY FIGURE RL (for Roman Lower case) .br;_.!DISPLAY FIGURE LU (for Letter Upper case) .br;_.!DISPLAY FIGURE LL (for Letter Lower case) For table numbers use: .b .br;_.!DISPLAY TABLE D (default) .br;_.!DISPLAY TABLE RU (for Roman Upper case) .br;_.!DISPLAY TABLE RL (for Roman Lower case) .br;_.!DISPLAY TABLE LU (for Letter Upper case) .br;_.!DISPLAY TABLE LL (for Letter Lower case) If for any reason you want to change the display format in the middle of the document, you may simply insert the proper DISPLAY command in the document where you want to start the new display format. .page .hl2 How to refer to current figure, table or paragraph For a figure to be referenced from the same paragraph, the figure must be defined before it can be referenced. Insert the following line in the paragraph that the figure is to be. .b _.!FG title of your figure here .b After the figure is defined, you may refer to the figure number by using the special character sequence ^*;;FN\* these four characters will be substituted by the display format of the figure in effect at the time. The ;;FN sequence may appear anywhere in a line. The ;;FN sequence will always refer to the most recently defined figure in the current paragraph. For a table to be referenced from the same paragraph, the table must be defined before it can be referenced. Insert the following line in the paragraph that the table is to be. .b _.!TB title of your table here .b After the table is defined, you may refer to the table number by using the special character sequence ^*;;TN\* these four characters will be substituted by display format of the table in effect at the time. The ;;TN sequence may appear anywhere in a line. The ;;TN sequence will always refer to the most recently defined table in the current paragraph. .begin bar For a paragraph number to be referenced from the same paragraph, just use the special character sequence ^*;;PN\* these four characters will be substituted by the display format of the paragraph number in effect at the time. The ;;PN sequence may appear anywhere in a line. The ;;PN sequence will always refer to the current paragraph. .end bar .page .hl2 Cross reference of figures, tables and paragraphs You may now also do cross referencing of your figure or table numbers from anywhere in your document. In order for a figure number to be referred to from anywhere in the document, you must save the figure number after it is defined, so after the .!FG line, you should insert the following line: .b _.!F(n) .b N is a number from 1 to 300. This means your may have up to 300 figure numbers saved to be cross referenced from elsewhere in the document. The numbers you use for n need not be sequential. Note that you should not use the same number n twice in a .!F(n) line because the last one saved in the document is the one used by FIG to generate your figure number. To refer to that figure from anywhere in the document (even before it is defined, because FIG take two passes for cross reference) use the special sequence of characters ^*;;F(n)\* (where n is the same as the n you used to save that figure). The character sequence can appear anywhere in a line. In order for a table number to be referred to from anywhere in the document, you must save the table number after it is defined, so after the .!TB line, you insert the following line: .b _.!T(n) .b N is a number from 1 to 300. This means your may have up to 300 table numbers saved to be cross referenced from elsewhere in the document. The numbers you use for n need not be sequential. Note that you should not use the same number n twice in a .!T(n) line because the last one saved in the document is the one used by FIG to generate your table number. To refer to that table from anywhere in the document (even before it is defined, because FIG take two passes for cross reference) use the special sequence of characters ^*;;T(n)\* (where n is the same as the n you used to save that table). The character sequence can appear anywhere in a line. .begin bar In order for a paragraph number to be referred to from anywhere in the document, you must save the paragraph number in the paragraph where it is defined. So anywhere in the paragraph where you want to save its paragraph number, you insert the following line: .b _.!P(n) .b N is a number from 1 to 300. This means your may have up to 300 paragraph numbers saved to be cross referenced from elsewhere in the document. The numbers you use for n need not be sequential. Note that you should not use the same number n twice in a .!P(n) line because the last one saved in the document is the one used by FIG to generate your paragraph number. To refer to that paragraph from anywhere in the document (even before it is defined, because FIG take two passes for cross reference) use the special sequence of characters ^*;;P(n)\* (where n is the same as the n you used to save that paragraph). The character sequence can appear anywhere in a line. .end bar .page .hl2 Output files from FIG The program FIG will accept as input a file with the extension .PRE and creates the up to three files with the same file name and the extensions .RNO, .TAB, and .FIG. The .RNO file is always created, the .TAB file is created if you define tables, the .FIG file is created if you define figures. The .RNO file may then be runoff using RUNOFF. The .TAB file contains a list of tables and the .FIG file contains a list of figures, with the table or figure number and the titles as specified in the .!TB and _.!FG lines. However, page numbers where the figures and tables are located are not provided in these files; they must be inserted by hand using any editor. The .TAB and .FIG files may be printed out separately or may be included in your .RNO file to be printed later. See also a later section on generating table of contents, figures and tables. .page .hl2 Limitations of FIG The program FIG has the following limitations: .ls .begin bar .le;A line must not exceed 200 characters after it is expanded by FIG. (the figure and table references ;;FN, ;;TN, ;;PN, ;;P(n) ;;F(n) and ;;T(n) are expanded in any line containing them and written out still on the same line) .le;A total of 300 figures, 300 tables and 300 paragraphs may be saved for cross referencing. .end bar .le;There is no limit on the total number of figures and tables in the document which are defined using .!FG and .!TB lines. .le;The sequence ;;FN always refers to the most recently defined figure number in the current paragraph. .le;The sequence ;;TN always refers to the most recently defined table number in the current paragraph. .begin bar .le;The sequence ;;PN always refers to the current paragraph. .end bar .le;The sequence ;;F(n) refers to the last figure defined in the whole document using the .!F(n) line, in case of multiple uses of the number n. .le;The sequence ;;T(n) refers to the last table defined in the whole document using the .!T(n) line, in case of multiple uses of the number n. .begin bar .le;The sequence ;;P(n) refers to the last paragraph defined in the whole document using the .!P(n) line, in case of multiple uses of the number n. .end bar .le;The sequential numbering of figures and tables can be turned on, but can not be turned off once it is turned on using the SEQUENTIAL command line. This means you can not change the format in the middle of the document. .le;The following RUNOFF commands (and their abbreviations) related to paragraph numbering are supported in FIG, so the paragraph number prefixed to a figure or table number is displayed in the corresponding format. .b .ls0 .dle "(",LL,")" .le;_.DISPLAY CHAPTER .le;_.DISPLAY LEVELS .le;_.SET LEVEL .le;_.NUMBER CHAPTER .le;_.HEADER LEVEL .le;_.CHAPTER .els0 .le;The RUNOFF command .NUMBER LEVEL is not currently supported by FIG. .le;FIG does not supply page numbers for figures and tables in the .FIG and the .TAB files. .els .page .hl2 Messages from FIG Informational messages: .ls .le;Input file name (.PRE assumed): .b;You are expected to enter the input file name, the extension need not be entered, and if entered, it is ignored. FIG attaches the extension _.PRE to the file name. .le;--- Starting Pass 2 --- .b;If you define tables or figures to be cross referenced, FIG will go through a second pass, this message informs you that it is starting pass 2. .le;--- Done, created x.RNO x.TAB x.FIG .b;FIG is done processing your file, and the files created are listed. .els Warning message: .ls .le;line n has unsupported FORMAT specifier .b;Line n has a display format other than Decimal, Roman Upper case, Roman Lower case, Letter Upper case and Letter Lower case is specified. The Decimal format is used. .le;line n is missing a required number parameter .b;You did not supply a required number parameter for the RUNOFF command on line n. A zero is used, which may cause additional error messages. .le;line n has undefined figure reference .b;Line n has .!F(n) where there is no figure defined in the current paragraph. Or line n uses ;;F(n) where n is not defined in the document. The reference is ignored. .le;line n has undefined table reference .b;Line n has .!T(n) where there is no table defined in the current paragraph. Or line n uses ;;T(n) where n is not defined in the document. The reference is ignored. .begin bar .le;line n has undefined paragraph reference .b;Line n uses ;;P(n) where n is not defined in the document. The reference is ignored. .end bar .le;line n refers to undefined current figure number .b;Line n uses ;;FN but there is not current figure number defined in this paragraph. The reference is ignored. .le;line n refers to undefined current table number .b;Line n uses ;;TN but there is not current table number defined in this paragraph. The reference is ignored. .le;line n results in illegal header level number .b;Either a SET LEVEL or HEADER LEVEL command in line n results in a header level smaller than 1 or greater than 6. In the case of a HEADER LEVEL command, the faulty command functions as a HEADER LEVEL without a number for FIG. In the case of a SET LEVEL command, the line is ignored by FIG but written out to the .RNO file just as is. Of course when you invoke RUNOFF, error messages will appear also. You should correct the level number and rerun through FIG. .le;line n missing ) .b;Line n has .!F(n), .!T(n) or .!P(n) or ;;F(n) or ;;T(n) or ;;P(n), but the right paranthesis is missing. The line is ignored but written to the .RNO file. .le;line n figure number is not between 1 and 300 .b;Line n has .!F(n) or ;;F(n) where n is not between 1 and 300. The line is ignored but written out to the .RNO file. .le;line n table number is not between 1 and 300 .b;Line n has .!T(n) or ;;T(n) where n is not between 1 and 300. The line is ignored but written out to the .RNO file. .le;line n paragraph number is not between 1 and 300 .b;Line n has .!P(n) or ;;P(n) where n is not between 1 and 300. The line is ignored but written out to the .RNO file. .le;line n results in illegal chapter number .b;Line n has a NUMBER CHAPTER command which results in a chapter number smaller than 1. The line is ignored but written out to the .RNO file. If you use RUNOFF without correcting this line, an error message will appear. .le;line n uses unsupported NUMBER LEVEL command .b;Line n uses unsupported NUMBER LEVEL command or its abbreviation. The line is ignored by FIG but written out to the .RNO file. Table or figure references past this line will probably not be correct. .le;line n has unknown display reference. .b;Line n refers to a number displyed in Roman or Letter format that is greater than 300. FIG does not know how to count in Roman or Letter beyond 300. Hopefully you will not see this message. .els Fatal messages: .ls .le;error opening file x .b;FIG can not open the input file x. Make sure your input file has the extension .PRE. .le;error reading file x .b;FIG can not read input file x. Check file protection. .le;error writing file x .b;FIG can not write to file x. File x can be either the .RNO .TAB or .FIG file. This should not happen unless maybe the disk is full or you can not write to the directory due to protection violation. .le;--- error, tl too small --- .b;When this message is displayed, FIG will die because the paragraph number and the figure or table number combination resulted in a character string that is too long to be written out to the .TAB or .FIG file. Currently 20 characters are the maximum allowed, which should be enough for normal applications. .els .page .title Generating Table of Contents, Figures and Tables .nosubtitle .hl1 generating table of contents, figures and tables The standard RUNOFF table of contents does not have a header that says TABLE OF CONTENTS. But this can be inserted if you do the following: .ls .le;In your source .RNO (or .PRE) file where you want the table of contents to appear, instead of using .REQUIRE "x.RNT" use the line: .b _.STC .REQUIRE "SYS$SYSDEVICE:[UTILITY]TOC.RNO" .b .le;If you have a list of figures to be included, then at the very end of your source x.PRE file, include the lines: .b _.STC .REQUIRE "SYS$SYSDEVICE:[UTILITY]TOF.RNO" .br _.STC .REQUIRE "x.FIG" .b where x is the name of your source file as in x.pre .le;If you have a list of tables to be included, then at the very end of your source x.PRE file, include the lines: .b _.STC .REQUIRE "SYS$SYSDEVICE:[UTILITY]TOT.RNO" .br _.STC .REQUIRE "x.TAB" .b where x is the name of your source file as in x.pre .els When you are done with the source file, run it through the FIG program as described earlier if necessary. And type in the command .b $DOTOC x This will create the x.mem and x.mec files for you, where the .MEM file is your document without the table of contents. The .MEC file will have the table of contents, list of figures and list of tables, with the lower case Roman numeral page numbers. You may have to go into an editor to put the page numbers in for the list of figures and list of tables. Then the files may be printed out. To print out your documents, use the HELP PRINT__COMMANDS command to see what options you have.