Page Numbers: Yes X: 522 Y: 10.5" First Page: 91
Margins: Top: 1.3" Bottom: 1"
Even Heading:
LAUREL MANUAL
Odd Heading:
Appendix C. Hardcopy Forms
Appendix C. Hardcopy Forms
Laurel allows you to create your own custom hardcopy forms by including a description of each form in your Laurel profile. The language used to specify these forms is described in this appendix. The forms that are built into Laurel are listed at the end of this appendix, written in this forms language.
The syntax for a hardcopy form definition in your Laurel profile is
HardcopyForm: <form>
where <form> is described in more detail below. Each <form> contains the name of the defined hardcopy form. If a hardcopy form included in your profile has the same name as a built-in hardcopy form, then the form in your profile replaces that built-in form. There is no intrinsic limit on the number of forms you may put in your Laurel profile.
In this description, words in angle brackets refer to items to be described in further detail. All parentheses shown are included in the actual hardcopy form. Items separated by whitespace may be separated in the hardcopy form by one or more whitespace characters or by a CR followed by at least one whitespace character. Never put two CR’s together in the hardcopy form. It will terminate the parse.
When creating your own hardcopy forms, it is usually best to modify an existing form, rather than building it from scratch. The profile error message for most errors in hardcopy forms is just Profile syntax error near <text>.
C.1. <Form>
The printed page is divided into two areas: the text area and the frame area. The text area is the rectangular space inside the four margins of the page in which message text is printed. The frame area is the space left over, from the margin lines to the edges of the page.
A <form> specifies the name of the form, the four margins, some leading (vertical spacing) information, and a list of <options> and <rows> of the form.
An <option> specifies an item that is generally printed in the frame area, e.g., a page number. Each <option> is printed on either the first page only or on all pages except the first page.
A <row> of the form extends across the text area horizontally and as far vertically as the text printed within requires. The <rows> are printed one after the other, in the same order as given in the <form>. Each <row> contains one or more <column>’s. <Column>’s are printed side-by-side within a <row>. The height of a <row> is the height of its longest <column>.
The types of values included in hardcopy forms are: text, mica, font number, and Boolean.
A text value is a string of characters bounded by double quote characters. If the string contains at least one character and it does not contain any whitespace characters, then the double quote characters may be omitted. To include a double quote character in a text value, use two double quote characters.
A mica value is a positive integer giving the number of micas in the X (horizontal) or Y (vertical) direction from the lower left corner of the printed page, as per in Press file page coordinates. One inch equals 2540 micas.
A font number is a positive integer between 0 and 9 inclusive that refers to a hardcopy font, either built-in or listed in the Laurel profile (section 5). The built-in forms use font numbers 0 through 3, and the standard HyType form uses font 9. These font numbers should be considered "reserved" when creating a new hardcopy form.
A Boolean is a logical value represented by the words TRUE or FALSE. The abbreviations T and F are also accepted.
The syntax for a <form> is:
<FormName> <TopY> <BottomY> <LeftX> <RightX> <LineLeading> <StartNewPage>
( Options <Options> ) ( Rows <Rows> )
The individual fields of the <form> are:
<FormName>:A text value that names the form.
<TopY>: The top margin in micas, measured from the bottom of the page. The first <row> will be printed at this location as long as it has no vertical tab.
<BottomY>: The bottom margin in micas, measured from the bottom of the page. Any text within a <row> that would be printed below this point will be printed on the next page instead.
<LeftX>: The left margin in micas, measured from the left edge of the page. This value is overridden by <leftX> values in <row>’s and <option>’s.
<RightX>: The right margin in micas, measured from the left edge of the page. This value is overridden by <leftX> values in <row>’s and <option>’s.
<LineLeading>: No longer used. Preserved for compatibility with extant forms.
<StartNewPage>: A Boolean value that controls whether each message will start on a new page. The built-in InternalMemo and Blank forms set this value to TRUE; the Archive and Headers forms set it to FALSE.
<Options>: The <options> consist of one or more <option>’s separated by spaces, i.e., <option>+. The ( Options <options> ) part of the form, complete with surrounding parentheses and keyword, may be omitted if no options are desired.
<Rows>: The <rows> consist of one or more <row> separated by spaces, i.e., <row>+. The ( Rows <rows> ) part of the form, complete with surrounding parentheses and keyword, may be omitted if no rows are desired.
See the last section of this appendix for examples of <form>’s.
C.2. <Option>
An <option> may be a caption, heading, or page number. Each is considered in turn.
C.2.1. Caption option
A caption option prints a fixed piece of text at a fixed location on the page. The syntax for a caption option is:
( Caption <LeftX> <BaseLineY> <Font> <OnFirstPage> <Text> )
The parameters are:
<LeftX>: The horizontal position, measured from the left edge of the page in micas, for the left edge of the caption.
<BaseLineY>: The vertical position, measured from the bottom of the page in micas, for the baseline of the letters in the caption.
<Font>: The number of the font in which the caption is printed.
<OnFirstPage>: If TRUE, then this caption is printed on the first page only. If FALSE, then this caption will be printed on all pages except the first page. To print the same caption on all pages, include two caption options, one with this value TRUE and the other with this value FALSE.
<Text>: The text of the caption. If the text includes white space, surround the text with double quote characters.
For example, the following caption option taken from the built-in InternalMemo form prints the words "Laurel Message" at the top of the first page of each message printed.
( Caption 4445 26670 2 T "Laurel Message" )
C.2.2. Heading option
A heading option prints the initial portion of a specified message header field’s value at a fixed location on the page. The syntax for a heading option is:
( Heading <LeftX> <BaseLineY> <Font> <OnFirstPage> <FieldName> <RightX> )
The <LeftX>, <BaseLineY>, <Font>, and <OnFirstPage> parameters are as in the caption option. The other two parameters are:
<FieldName>:The name of the message header field whose value is printed as the heading.
<RightX>:The horizontal position, measured from the left edge of the page in micas, for the right edge limit of the heading. The heading text may be truncated if it is too long to be printed before this limit.
For example, the following heading option taken from the built-in InternalMemo form prints the value of the Subject: field at the top of the second and subsequent pages of each message, without running into the page number.
( Heading 3175 26670 0 F Subject 15875 )
C.2.3. Page number option
A page number option prints the page number at a fixed location on the printed page. The syntax for a page number option is:
( PageNumber <LeftX> <BaseLineY> <Font> <OnFirstPage> )
All parameters are as in the caption option.
For example, the following page number option taken from the built-in InternalMemo form prints page numbers at the upper right of the second and subsequent pages of each message printed.
(PageNumber 18415 26670 0 F)
C.3. <Row>
The syntax for a <row> is:
( <RowLeading> <VerticalTab> <LineLeading> <Columns> )
The individual fields of the <row> are:
<RowLeading>: The spacing in micas between the bottom of the previous row and this row.
<VerticalTab>: The top line of the row is printed at or below this vertical position, measured in micas from the bottom of the page. If the previous row has finished below this position or if this value is zero, then it is ignored.
<LineLeading>: The vertical spacing in micas between printed lines in this row in addition to that provided by the hardcopy fonts themselves.
<Columns>: The <columns> consist of one or more <column>’s separated by spaces, i.e., <column>+.
For example, the following row taken from the built-in InternalMemo form prints the message body with no additional row leading, no vertical tab, and 35 micas additional leading between lines of the message body.
( 0 0 35 ( Body 3175 19050 0 ) )
C.4. <Column>
A <column> may be a caption, field, other fields, body, or everything. Each is considered in turn.
C.4.1. Caption column
A caption column prints a fixed piece of text within a row. The syntax for a caption column is:
( Caption <LeftX> <RightX> <Font> <Text> )
The parameters are:
<LeftX>: The horizontal position, measured from the left edge of the page in micas, for the left edge of the caption.
<RightX>: The horizontal position, measured from the left edge of the page in micas, for the right edge limit of the caption. The text of the caption may be truncated if it is too long to be printed before this limit.
<Font>: The number of the font in which the caption is printed.
<Text>: The text of the caption. If the text includes white space, surround the text with double quote characters.
For example, the following caption column taken from the built-in InternalMemo form prints the word XEROX in font 3 near the left edge of the page after most of the header fields have been printed.
( Caption 635 19050 3 XEROX )
C.4.2. Field column
A field column controls the printing of a message header field name and its value. There are many parameters used to control this printing. The syntax for a field column is:
( Field <LeftX> <RightX> <ValueFont> <NameFont> <NameAboveValue> <Colon>
<ValueLeftX> <FieldName> <FieldNameAlternate> <Required> <Suppress>
<PrintFieldName> <BreakOnComma> )
The individual parameters of the field column are:
<LeftX>: The horizontal position, measured from the left edge of the page in micas, for the left edge of the field name.
<RightX>: The horizontal position, measured from the left edge of the page in micas, for the right edge of the space reserved for this field. If there is more text in the field value than will fit, then the field value is continued on the next line(s).
<ValueFont>: The number of the font in which the field value is printed.
<NameFont>: The number of the font in which the field name is printed.
<NameAboveValue>: A Boolean value. If TRUE, then the field value is printed starting on the line below the field name. If FALSE, then the field value is printed on the same line as the field name.
<Colon>: A Boolean value. If TRUE, then a colon (in the font for the field name) is printed after the field name.
<ValueLeftX>: The horizontal position, measured from the left edge of the page in micas, for the left edge of the field value. If the printed field name encroaches on the space reserved for the field value, then the field value begins one space after the field name (if <NameAboveValue> is FALSE). Subsequent lines of the field value start at the <ValueLeftX> position.
<FieldName>: The name of the field to be printed.
<FieldNameAlternate>: An alternate name for this field. The field values from both the <FieldName> and the <FieldNameAlternate> fields are printed in the space reserved for the field value. This is useful for fields that go by two names, e.g., c and cc. The <FieldName> is the one that is printed in the field name area. Use "" to specify no alternate field name.
<Required>: A Boolean value. If TRUE, then the field name is printed even if this field is not in the message. If FALSE, then this field is omitted from the hardcopy if it (and its alternate) is not present in the message.
<Suppress>: A Boolean value. If TRUE, then the field (name and value) is not printed even if this field is present in the message. If FALSE, then this field is printed if the <FieldName> or the <FieldNameAlternate> is present in the message.
<PrintFieldName>: A Boolean value. If TRUE, then the field name is printed along with the field value. If FALSE, then the field name is suppressed, but the field value is printed. This printing is subject to the field’s presence in the message and the other parameters for this field.
<BreakOnComma>: A Boolean value. If TRUE, then when printing the field value, commas are not printed but instead cause line breaks. If FALSE, then the field body is printed normally. This parameter is useful for cc: fields.
For example, the following field column taken from the built-in InternalMemo form prints the required field "From" with a colon and with its value following on the same line.
( Field 3175 10795 0 1 F T 4445 From "" T F T F )
C.4.3. OtherFields column
An OtherFields column controls the printing of all message header fields in the message that are not specifically mentioned in field columns elsewhere in the form. Generally, only one OtherFields column should be used in any form. The syntax for an OtherFields column is:
( OtherFields <LeftX> <RightX> <ValueFont> <NameFont> <NameAboveValue> <Colon>
<ValueLeftX> <InterFieldLeading> )
All parameters in an OtherFields column have the same meanings as in the field column, except that they apply to all fields of the message that are not dealt with by field columns. The one new parameter is:
<InterFieldLeading>: The vertical spacing in micas between successive fields not mentioned elsewhere in the form. This value is independent from the <LineLeading> value taken from the row in which this column is embedded.
For example, the following OtherFields column taken from the built-in InternalMemo form prints all fields found in the message header other than those specifically mentioned in the InternalMemo form with colons and with their values following on the same line. The spacing between these fields is 500 micas (about .2 inches).
( OtherFields 3175 19050 0 1 F T 4445 500 )
C.4.4. Body column
A body column prints the message body, i.e., the portion of the message following the first double CR in the message. Generally, only one body column should be used in any form. The syntax for a body column is:
( Body <LeftX> <RightX> <Font> )
The individual fields of the body column are:
<LeftX>: The horizontal position, measured from the left edge of the page in micas, for the left edge of the body.
<RightX>: The horizontal position, measured from the left edge of the page in micas, for the right edge of the space reserved for the body. If there is more text in the body than will fit, then the field value is be continued on successive lines.
<Font>: The number of the font in which the body is printed.
For example, the following body column taken from the built-in InternalMemo form prints the message body in the text area of the page in font 0.
( Body 3175 19050 0 )
C.4.5. Everything column
An everything column prints the entire message: header, double CR, and body. Generally, only one everything column should be used in any form. The syntax for an everything column is:
( Everything <LeftX> <RightX> <Font> )
All parameters of the everything column have the same meanings as in the body column.
For example, the following everything column taken from the built-in Archive form prints the entire message in the text area of the page in font 0.
( Everything 3175 19050 0 )
C.5. Laurel’s built-in forms
C.5.1. InternalMemo form
The InternalMemo form prints a message on the familar Bravo-style memo form. The herald "Laurel Message" appears at the top of the first page, and the fields are formatted. A Xerox logo appears after most of the header fields, with the In-Reply-To: field following if present in the message. The message body is printed, and the cc: field is printed last, with all names in that field printed on separate lines. Subsequent pages have a portion of the Subject: field printed as a heading.
HardcopyForm: InternalMemo 25400 2540 3175 19050 0 T
( Options
( Caption 4445 26670 2 T "Laurel Message" )
( Heading 3175 26670 0 F Subject 15875 )
( PageNumber 18415 26670 0 F )
)
( Rows
( 0 0 35 ( Field 3175 10795 0 1 F T 4445 From "" T F T F )
( Field 12065 19050 0 1 F T 13018 Date "" T F T F ) )
( 0 0 0 (Field 3175 19050 0 1 F T 4445 PrintForm "" F T T F ) )
( 420 0 35 (OtherFields 3175 19050 0 1 F T 4445 500 ) )
( 1000 0 35 ( Caption 635 19050 3 XEROX ) )
( 1000 0 35 ( Field 3175 19050 0 1 F T 4445 In-Reply-To "" F F T F ) )
( 1000 0 35 ( Body 3175 19050 0 ) )
( 420 0 35 ( Field 3175 19050 0 1 F T 3810 cc c F F T T ) )
)
C.5.2. Blank form
The Blank form prints a message on a slightly formatted, but much plainer form, than does the InternalMemo form.
HardcopyForm: Blank 25400 2540 3175 19050 0 T
( Options
( Heading 3175 26670 0 F Subject 15875 )
( PageNumber 18415 26670 0 F )
)
( Rows
( 0 0 35 ( OtherFields 3175 19050 0 1 F T 4445 500 ) )
( 1000 0 35 ( Body 3175 19050 0 ) )
)
C.5.3. Headers form
The Headers form prints a subset of the fields of the selected messages, one after another, without skipping to a new page before each new message. This form is useful for printing extracts of message headers similar to the Laurel table-of-contents. A caption on each page labels the fields printed underneath.
HardcopyForm: Headers 25400 2540 1800 20500 0 F
( Options
( Caption 8000 26670 0 T "Laurel Table of Contents" )
( Caption 1800 26300 1 T From: )
( Caption 6245 26300 1 T Subject: )
( Caption 15000 26300 1 T Date: )
( PageNumber 20000 26670 0 T )
( Caption 8000 26670 0 F "Laurel Table of Contents" )
( Caption 1800 26300 1 F From: )
( Caption 6245 26300 1 F Subject: )
( Caption 15000 26300 1 F Date: )
( PageNumber 20000 26670 0 F )
)
( Rows
( 300 0 35 ( Field 1800 5610 0 1 F F 2000 From "" T F F F )
( Field 6245 14365 0 1 F F 6550 Subject "" T F F F )
( Field 15000 20500 0 1 F F 15300 Date "" T F F F ) )
)
C.5.4. Archive form
The Archive form prints messages unformatted, one after the other without skipping to a new page. This form is useful for printing messages for long term storage, rather than as individual messages.
HardcopyForm: Archive 25400 2540 3175 19050 0 F
( Options
( PageNumber 18415 26670 0 T )
( PageNumber 18415 26670 0 F )
)
( Rows
( 200 0 35 ( Caption 2000 19050 0
"-------------------- Start of message --------------------" ) )
( 200 0 35 ( Everything 3175 19050 0 ) )
)