home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / textutil / jgpsuite / xmp / EXLBL < prev    next >
Encoding:
Text File  |  1993-01-22  |  6.6 KB  |  149 lines

  1. .// Cannot be used with JGDoc; requires a Merge file
  2. .// 34.              Exlbl
  3. .// By reading this file you have entered into a contract specified in the
  4. .// file Licence. Please refer thereto for details.
  5. .// Sent to screen, it imposes mode 16; you must ensure you have enough memory.
  6. .hd
  7. /
  8. .fig 1
  9. /
  10. .ft
  11. /
  12. /
  13. .sp 6
  14. .cpi 12 1 95
  15. .ht 3 35 68
  16. .nofj
  17. .rpt 0
  18. /.setu 1 :\f}school :
  19. .setu 2 :\f}Add1 :
  20. .setu 3 :\f}Add2 :
  21. .setu 4 :\f}school :
  22. .setu 5 :\f}Add1 :
  23. .setu 6 :\f}Add2 :
  24.  
  25. \t}Head of Mandarin Chinese \h2Head of Mandarin Chinese \h3Head of Mandarin Chinese
  26. \t\u1 \h2\u4 \h3\f}school \g
  27. \t\u2 \h2\u5 \h3\f}Add1 \g
  28. \t\u3 \h2\u6 \h3\f}Add2 \g
  29. .fig 1600
  30. /
  31. .fj
  32. .hd
  33. :
  34.  
  35. .col
  36. |Labels|7/4/89
  37.  
  38. :
  39. .page
  40. .ft
  41. /
  42.  
  43. .col
  44. |(c) JG&AL Laski, 1989
  45.  
  46. /
  47. .stop Print commentary
  48. Labels, in which the same pattern of text is repeated for multiple records,
  49. present many difficulties not only to a text\-manipulating system, but also to
  50. the user who needs to specify her requirements.
  51.  
  52. They require very precise positioning on the paper, both vertically, and,
  53. probably, horizontally. The size of the labels forces the user to set an exact
  54. depth between each printed repetition; moreover, since labels may need to be
  55. printed on single sheets, and printers vary in how high up the page printing
  56. can begin, there may also be an initial positioning difficulty.
  57.  
  58. A discussion of the fine points of the example on the preceeding page, which
  59. uses exlblm as a merge file is put in the context of a general discussion of
  60. the problems. Exlblm is also appended hereto so that it may be looked at.
  61.  
  62. I had originally thought that it would be neccessary to have a special .LBL
  63. directive, and had given some thought to the plethora of parameters that the
  64. user would need to supply, and the ad-hoc nature of how she would have to
  65. specify these.
  66.  
  67. However, after providing the .RPT mechanism, it seemed to me that facilities
  68. already existed for horizontal and vertical positioning. Therefore, if I
  69. extended the .RPT from repeating a text a given number of times to repeating
  70. until a merge file was exhausted, I could use existing facilites. I therfore
  71. added the rule that, if .RPT is followed by a 0 parameter, repetition
  72. continues until a merge file is exhausted.
  73.  
  74. The most unusual need was to be able to lay out the fields from more than one
  75. record across the page.
  76.  
  77. But this is precisely the problem of preserving fields until they are needed
  78. from records that have already been overwritten. User variables are the
  79. solution, as they were for the addresses to be used at the bottom of the
  80. letter in the exmerge example.
  81.  
  82. In the example above, .setu 1 to .setu 6 pick up the three variable lines for
  83. the first two labels, the first three while the first record is available, the
  84. others while the second is; those for the third are picked up as the lines
  85. involved are constructed, since they come from the current record.
  86.  
  87. \\g brings in successive records. I have put these directives inside a .setu
  88. directive for user variable 7 (which is never used), in order not to put out
  89. lines that make the vertical positioning more difficult to think about.
  90.  
  91. Horizontal positioning is straightforward, governed by the .cpi directive for
  92. characters per inch, and the .ht directive for tab setting. The example uses
  93. 12 cpi and tabs at 3, 35, 68, so that the left margins of the label texts
  94. start 0.25", 3" and 5.67" from the left edge of the paper. Even though I
  95. measured the size of the labels, I had to adjust my first attempts to get both
  96. positionings right; experiment is always more reliable than calculation. Your
  97. printer and labels may well require you to modify these values.
  98.  
  99. Vertical positioning divides into two parts: the depth between successive
  100. labels, which requires appropriate vertical spacing to be put inside the
  101. repeat loop, and an initial depth setting to put the first line on the correct
  102. position on the label, given where on the paper your printer can put out its
  103. first line. This should be set in the header.
  104.  
  105. In my view, it is more transparant to use the .fig directive than to use empty
  106. lines to get the positioning right. Again, your printer and labels will
  107. probably require you to alter the values in the example.
  108.  
  109. My labels are just over 1.5" deep;  I explicitly put in the directive
  110. ..SP 6 to provide 6 lines per inch (in fact my default depth).
  111. There are 4 textual lines in each label, so after trying .fig 4 and .fig 5, I
  112. found that a .FIG 1600 directive (just under 4.5 lines) gave me the repetition
  113. depth that matched my labels. It was to simplify this work that I kept
  114. the \\g out of running text. Note that the .setu immediately follows the
  115. bracketting / without the usual newline; a dot at the beginning of any kind of
  116. included text is treated as beginning a dotty, and, as here, one sometimes
  117. wants to avoid putting out a blank line. However, note that the repeated text
  118. ends with a newline.
  119.  
  120. My printer is very good at gripping the top of pages, so .FIG 1 in the header
  121. put the first line in about the right vertical position on the label. It is
  122. sometimes neecessary to forgo the first set of labels.
  123.  
  124. I would recommend the user to start with this example, excluding this jaw\-jaw,
  125. as a paradigm from which to adapt to her requirements, her labels and her
  126. printer.
  127.  
  128. More complicated effects can easily be produced. Consider, for example,
  129. producing a label of reviewer/title pairs from the exmergm file.
  130.  
  131. Finally, this example shows why \\g (nextrecord), at the end of a merge file,
  132. leaves the last record in place, and does not cause a diagnostic error.
  133.  
  134. .nofj
  135. Here is exlblm:
  136. Use,School,Add1,Head,Tel,Add2,HoD
  137. N,Abbot's Bridge School,Gorbal Drive,Ms. Bigsum,3104 9175,SX8 3E3,Ms. Olive Plum
  138. Y,Anatol Hooley School,Hooley Road,Mr. Powdall,478 53111,XW5 XXX,J. Butcher
  139. Y,Archbishop H. Guffery School,Bushbox Road,Mrs. Mist,7601 1466,4E3, Mrs. J Blister
  140. N,Bath School,School Road,Mr. Cummings,9743 23726,Howtown\, Churchshire.,
  141. Y,Braeberries School,Laurel Hill,Mrs. Stanchion,0248 36562,Amersham\, Bucks.,
  142. N,Bunbury School,Lower Drive,Mrs. Murray,8709 9331,TW13 XYH,
  143. Y,Cliveden School,Boottree Road,Mrs. Muggins,8485 3414,NTT2 2XB,Mrs Ann Nugente
  144. Y,Cribhall School,Mayers Bridge Road,Mr. Brown,0344 24444,Rudgeton RP3 2XX,Miss B. Bunker
  145. Y,Dallymount School,Stayton Street,Mr. Pummell (Acting),7329 44535,ZZ 6ZX,
  146. Y,Dick Whittington School,Abbey Road,Mr. Gardiner,0674 95534,XC3 2ZZ,
  147. Y,Eccleshall School,Rose Gardens,M. Townley,7188 44421,XZ15,Mr.R.Saltmarsh
  148. Y,Elvis End School,Elvis End Road,Mr. Tartin,3851 23333,XX9 3XZ,
  149. N,Descartes School,Metaphysics Drive,Dr. Idealist, 012 35813,XY0 9ZT,Miss F. Rege