1 LISP LIBRARY PACKAGES MANUAL 1 LISP LIBRARY PACKAGES MANUAL HRULE 1 GRAPHICS 1 HRULE 6 HRule is a package that lets you create horizontal rules (solid horizontal lines of various thicknesses) in a TEdit document. Rules are often used to set off titles and page headings from regular text, and to create decorative effects. To load HRule, type (LOAD '{DEVICE}HRULE.DCOM) in your Interlisp-D executive window. 2 Creating Horizontal Rules 1 You specify a rule's thickness in decimal fractions of a printer's point (1/72 of an inch); a rule can be, theoretically, infinitely small or infinitely large. For most documents, however, you will probably want to create rules that are between half a point and six points thick. On printers, you can't usually tell the difference between rules that are less than point apart in thickness. To create a horizontal rule, place the caret at the point in your document where you want the rule to begin, then type control-O. This will bring up a small window titled Form to Eval that contains a blinking caret (Figure 1). Type (HRULE.CREATE N) after the caret, with N indicating the thickness of the rule. For example, to create a 4-point rule you would type (HRULE.CREATE 4); to create a 2-point rule you would type (HRULE.CREATE 2.5). Then press the carriage return. The window will close, and a rule of the specified size will be created, extending from the TEdit caret to the right margin of the paragraph. This means that nothing can appear to the right of a rule on the same line. 0A`a3LL3`L88ll Figure 1. Window that opens when you type control-O. So, for example if you type the following paragraph This is an example of a paragraph that is about to have a horizontal rule inserted in it, to show what happens. and insert a 2-point rule after the word rule, you end up with This is an example of a paragraph that is about to have a horizontal rule2.5 inserted in it, to show what happens. Like other image objects in TEdit, a rule is a single character that can be deleted, moved, and copied like any other character. You can use the Paragraph Looks menu to change the width of a rule if you don't want it to extend to the normal right margin of your document. 2 Stacking Several Rules in a Single Object 1 Sometimes, you will want to stack several rules atop one another, with space between them. This can be used to achieve effects like (.5 .5 .5) and (3 1 1 1 3) To create built-up rules of this type, follow the same procedure as above, but provide a list of rule widths and spacings in place of the single rule width. The first example above was created using the form (HRULE.CREATE '(.5 .5 .5)), and the second example was created using the form (HRULE.CREATE '(3 1 1 1 3)). The first number in the list is the thickness of the topmost rule, the next number is the space below it, the third number is the next rule, and so on. 2 Examples 1 Below are some examples of horizontal rules. In addition, you might want to look at the rules in this document, which were all created with HRule. .5 point rule 1 1-point rule 1.5 1-point rule 2 2-point rule 2.5 2-point rule 3 3-point rule 3.5 3-point rule 4 4-point rule 4.5 4-point rule 5 5-point rule 5.5 5-point rule 6 6-point rule Below are some examples of built-up rules, along with what you would type to create them: (1 1 1) (HRULE.CREATE '(1 1 1)) (1 1 3) (HRULE.CREATE '(1 1 3)) (.5 .5 .5 1 6) (HRULE.CREATE '(.5 .5 .5 1 6)) (2 1 2) (HRULE.CREATE '(2 1 2)) (6 1 2) (HRULE.CREATE '(6 1 2))(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 27) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (270 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))/T/T/2T./T... .. B PAGEHEADING VERSOHEADA PAGEHEADINGFOOTINGVA PAGEHEADINGFOOTINGRB PAGEHEADING RECTOHEAD..MODERN?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) MODERNMODERN MODERN   HRULE.GETFNMODERN    HRULE.GETFNMODERN   HRULE.GETFNMODERN    HRULE.GETFNMODERN  HRULE.GETFNMODERN    5 HRULE.GETFNMODERN HRULE.GETFNMODERN  0 BMOBJ.GETFN3?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) 64pDI HRULE.GETFN' HRULE.GETFNMODERN* HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN   Z  HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN z