home *** CD-ROM | disk | FTP | other *** search
- .// Cannot be used with JGDoc; requires a Merge file
- .// 34. Exlbl
- .// By reading this file you have entered into a contract specified in the
- .// file Licence. Please refer thereto for details.
- .// Sent to screen, it imposes mode 16; you must ensure you have enough memory.
- .hd
- /
- .fig 1
- /
- .ft
- /
- /
- .sp 6
- .cpi 12 1 95
- .ht 3 35 68
- .nofj
- .rpt 0
- /.setu 1 :\f}school :
- .setu 2 :\f}Add1 :
- .setu 3 :\f}Add2 :
- .setu 4 :\f}school :
- .setu 5 :\f}Add1 :
- .setu 6 :\f}Add2 :
-
- \t}Head of Mandarin Chinese \h2Head of Mandarin Chinese \h3Head of Mandarin Chinese
- \t\u1 \h2\u4 \h3\f}school \g
- \t\u2 \h2\u5 \h3\f}Add1 \g
- \t\u3 \h2\u6 \h3\f}Add2 \g
- .fig 1600
- /
- .fj
- .hd
- :
-
- .col
- |Labels|7/4/89
-
- :
- .page
- .ft
- /
-
- .col
- |(c) JG&AL Laski, 1989
-
- /
- .stop Print commentary
- Labels, in which the same pattern of text is repeated for multiple records,
- present many difficulties not only to a text\-manipulating system, but also to
- the user who needs to specify her requirements.
-
- They require very precise positioning on the paper, both vertically, and,
- probably, horizontally. The size of the labels forces the user to set an exact
- depth between each printed repetition; moreover, since labels may need to be
- printed on single sheets, and printers vary in how high up the page printing
- can begin, there may also be an initial positioning difficulty.
-
- A discussion of the fine points of the example on the preceeding page, which
- uses exlblm as a merge file is put in the context of a general discussion of
- the problems. Exlblm is also appended hereto so that it may be looked at.
-
- I had originally thought that it would be neccessary to have a special .LBL
- directive, and had given some thought to the plethora of parameters that the
- user would need to supply, and the ad-hoc nature of how she would have to
- specify these.
-
- However, after providing the .RPT mechanism, it seemed to me that facilities
- already existed for horizontal and vertical positioning. Therefore, if I
- extended the .RPT from repeating a text a given number of times to repeating
- until a merge file was exhausted, I could use existing facilites. I therfore
- added the rule that, if .RPT is followed by a 0 parameter, repetition
- continues until a merge file is exhausted.
-
- The most unusual need was to be able to lay out the fields from more than one
- record across the page.
-
- But this is precisely the problem of preserving fields until they are needed
- from records that have already been overwritten. User variables are the
- solution, as they were for the addresses to be used at the bottom of the
- letter in the exmerge example.
-
- In the example above, .setu 1 to .setu 6 pick up the three variable lines for
- the first two labels, the first three while the first record is available, the
- others while the second is; those for the third are picked up as the lines
- involved are constructed, since they come from the current record.
-
- \\g brings in successive records. I have put these directives inside a .setu
- directive for user variable 7 (which is never used), in order not to put out
- lines that make the vertical positioning more difficult to think about.
-
- Horizontal positioning is straightforward, governed by the .cpi directive for
- characters per inch, and the .ht directive for tab setting. The example uses
- 12 cpi and tabs at 3, 35, 68, so that the left margins of the label texts
- start 0.25", 3" and 5.67" from the left edge of the paper. Even though I
- measured the size of the labels, I had to adjust my first attempts to get both
- positionings right; experiment is always more reliable than calculation. Your
- printer and labels may well require you to modify these values.
-
- Vertical positioning divides into two parts: the depth between successive
- labels, which requires appropriate vertical spacing to be put inside the
- repeat loop, and an initial depth setting to put the first line on the correct
- position on the label, given where on the paper your printer can put out its
- first line. This should be set in the header.
-
- In my view, it is more transparant to use the .fig directive than to use empty
- lines to get the positioning right. Again, your printer and labels will
- probably require you to alter the values in the example.
-
- My labels are just over 1.5" deep; I explicitly put in the directive
- ..SP 6 to provide 6 lines per inch (in fact my default depth).
- There are 4 textual lines in each label, so after trying .fig 4 and .fig 5, I
- found that a .FIG 1600 directive (just under 4.5 lines) gave me the repetition
- depth that matched my labels. It was to simplify this work that I kept
- the \\g out of running text. Note that the .setu immediately follows the
- bracketting / without the usual newline; a dot at the beginning of any kind of
- included text is treated as beginning a dotty, and, as here, one sometimes
- wants to avoid putting out a blank line. However, note that the repeated text
- ends with a newline.
-
- My printer is very good at gripping the top of pages, so .FIG 1 in the header
- put the first line in about the right vertical position on the label. It is
- sometimes neecessary to forgo the first set of labels.
-
- I would recommend the user to start with this example, excluding this jaw\-jaw,
- as a paradigm from which to adapt to her requirements, her labels and her
- printer.
-
- More complicated effects can easily be produced. Consider, for example,
- producing a label of reviewer/title pairs from the exmergm file.
-
- Finally, this example shows why \\g (nextrecord), at the end of a merge file,
- leaves the last record in place, and does not cause a diagnostic error.
-
- .nofj
- Here is exlblm:
- Use,School,Add1,Head,Tel,Add2,HoD
- N,Abbot's Bridge School,Gorbal Drive,Ms. Bigsum,3104 9175,SX8 3E3,Ms. Olive Plum
- Y,Anatol Hooley School,Hooley Road,Mr. Powdall,478 53111,XW5 XXX,J. Butcher
- Y,Archbishop H. Guffery School,Bushbox Road,Mrs. Mist,7601 1466,4E3, Mrs. J Blister
- N,Bath School,School Road,Mr. Cummings,9743 23726,Howtown\, Churchshire.,
- Y,Braeberries School,Laurel Hill,Mrs. Stanchion,0248 36562,Amersham\, Bucks.,
- N,Bunbury School,Lower Drive,Mrs. Murray,8709 9331,TW13 XYH,
- Y,Cliveden School,Boottree Road,Mrs. Muggins,8485 3414,NTT2 2XB,Mrs Ann Nugente
- Y,Cribhall School,Mayers Bridge Road,Mr. Brown,0344 24444,Rudgeton RP3 2XX,Miss B. Bunker
- Y,Dallymount School,Stayton Street,Mr. Pummell (Acting),7329 44535,ZZ 6ZX,
- Y,Dick Whittington School,Abbey Road,Mr. Gardiner,0674 95534,XC3 2ZZ,
- Y,Eccleshall School,Rose Gardens,M. Townley,7188 44421,XZ15,Mr.R.Saltmarsh
- Y,Elvis End School,Elvis End Road,Mr. Tartin,3851 23333,XX9 3XZ,
- N,Descartes School,Metaphysics Drive,Dr. Idealist, 012 35813,XY0 9ZT,Miss F. Rege