NB. built from project: ~Source\packages\print\label\label
NB. print labels
NB.
NB. opt label dat    print page of labels
NB.
NB. measurements in inches, fonts in points
NB.
NB.   opt is paper source (default no change), e.g. 4 = manual feed
NB.
NB.   dat has elements:
NB.     0  rows
NB.     1  columns
NB.     2  topleft box (xywh)
NB.     3  vertical spacing
NB.     4  horizontal spacing
NB.     5  verbname
NB.
NB. verbname is a verb that writes text to the label. The labels
NB. can vary by row and column index.
NB.
NB. The right argument has 6 numbers:
NB.   xywhrc = xywh for box, row, column
NB.
NB. For example, see file: system\examples\print\labdemo.ijs
NB.
NB. Requires: write


NB. =========================================================
label=: 3 : 0
'' label y.
:
'rws cls xywh hspace vspace verb'=. y.

'x y w h'=. xywh

x=. ,rws# ,: x + (w + hspace) * i.cls
y=. cls# y + (h + vspace) * i.rws
xywh=. (x,.y),"1 w,h
rc=. ,/ (i.rws) ,."0 1 i.cls
xywhrc=. xywh ,. rc

startprint''
startpage''
verb~ "1 xywhrc
endpage''
endprint''
)

