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
|
function CalcHeight(Hoko,Moji)
global Wfile FID;
D=0;
Tmp=ascii(Hoko);
H=char(Tmp(1));
Str=['\settoheight{\Height}{'+Moji+'}'];
Str=[Str,'\settodepth{\Depth}{'+Moji+'}'];
if H=='n'
Str=[Str,'\setlength{\Height}{\Depth}'];
end
if H=='s'
Str=[Str,'\setlength{\Height}{-\Height}'];
end
if H=='c'
Str=[Str,'\setlength{\Height}{-0.5\Height}'];
Str=[Str,'\setlength{\Depth}{0.5\Depth}'];
Str=[Str,'\addtolength{\Height}{\Depth}'];
end
if Wfile=='default'
for I=1:size(Str,2)
mprintf('%s',Str(I));
end
mprintf('%s\n','%');
else
for I=1:size(Str,2)
mfprintf(FID,'%s',Str(I));
end
mfprintf(FID,'%s\n','%');
end
endfunction
|