1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
string fontname;
def labelheader(expr name) =
fontname=name;
message "$#@!" & jobname; % for recognizing the file name
message "!@#$\font\font" & fontname & "=" & jobname;
message ""; % defining the fontname
enddef;
def labelfoot =
message "!@#$";
message "";
enddef;
def beginlabeledchar(expr a,b,c,d,name) =
beginchar(a,b,c,d);
message "!@#$";
message "!@#$\def\" & fontname & name & "{\labels{%";
enddef; % start of the character macro
def endlabeledchar =
message "!@#$}{\font" & fontname & " \char" & decimal charcode & "}}";
message ""; % end of the character macro
endchar;
enddef;
def label(expr x,y,hor,vert,co) =
message "!@#$\move" & hor & vert & "(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef; % insert this text in these coordinates justified by parameters
% abbreviations for all justifications
def labelLU(expr x,y,co) =
message "!@#$\moveLU(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelRU(expr x,y,co) =
message "!@#$\moveRU(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelMU(expr x,y,co) =
message "!@#$\moveMU(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelLD(expr x,y,co) =
message "!@#$\moveLD(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelRD(expr x,y,co) =
message "!@#$\moveRD(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelMD(expr x,y,co) =
message "!@#$\moveMD(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelLM(expr x,y,co) =
message "!@#$\moveLM(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelRM(expr x,y,co) =
message "!@#$\moveRM(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelMM(expr x,y,co) =
message "!@#$\moveMM(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelLB(expr x,y,co) =
message "!@#$\moveLB(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelRB(expr x,y,co) =
message "!@#$\moveRB(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
def labelMB(expr x,y,co) =
message "!@#$\moveMB(" & decimal (x/cm) & "cm," & decimal (y/cm) & "cm,{" & co & "})%";
enddef;
|