1 10/02/85  Format of a Listform Segment
 2 
 3 A listform segment defines the format of a document to be produced
 4 from a list of records.  Its format consists of three parts: before
 5 section, record section, and after section.
 6 
 7 The before section is added to the document as a preface before any
 8 records are processed.  It can contain any desired text, including
 9 compose controls.  Its syntax is
10    <Begin before:>...text...<end;>
11 where "text" is ASCII text except that you must enter any < characters
12 as "<<".
13 
14 
15 The record section describes the document format for each lister file
16 record processed.  It contains field value strings to be copied from
17 the lister file being processed, compose controls, and any desired
18 text.  Its syntax is
19    <Begin record:>...text and <fieldname,W,J>...<end;>
20 where "fieldname" is the name of one of the fields in the lister
21 segment or :argN, where N is an integer or :date or :time or
22 :record_count; W is an integer specifying the field width to use
23 when placing a field value into the output; and J is the letter "l,"
24 "c," or "r" to indicate whether the field value should be left
25 justified, centered, or right justified within the W columns.  W and J
26 are optional.  The default for W is the actual width of the field
27 value; for J is left justification.
28 
29 
30 The after section is added to the document after all records are
31 processed.  It can contain any desired text, including compose
32 controls.  Its syntax is
33    <Begin after:>...text...<end;>
34 
35 To include any kind of arguments in a listform segment, you can insert
36 <:argN> at the desired location in the segment.  The control argument
37 -ag STR in the process_list command is then used to substitute the
38 desired string into the listform document.
39 
40 
41 Using listform segments, you can insert in a list processing document
42 the current date, the present time, and the number of records being
43 processed with the current command invocation.  You can insert this
44 special fields separately in any of the three sections, using the
45 format
46    <:date>
47    <:time>
48    <:record_count>
49 When you invoke process_list with a listform segment containing any of
50 these fields, the specified information is inserted into the document
51 being printed; no need to give control arguments in the command line.
52 
53 For related topics see lister.gi and listin_segment.gi; for examples
54 see the Multics WORDPRO Reference Manual (AZ98).