11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.9 2002/01/11 03:44:19 geraint
## Breaks compounds objects into individual components. Eliminates "incorrect object code error" in cbg.ps when component is not causally complete.
##
## Revision 1.8 2001/10/15 14:25:44 gawthrop
## Now handles white space at the end of component names
## Converts ports lables [1:5] into [1,2,3,4,5]
##
|
>
>
>
>
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.10 2002/04/28 18:55:03 geraint
## Fixed [ 549658 ] awk should be gawk.
## Replaced calls to awk with call to gawk.
##
## Revision 1.9 2002/01/11 03:44:19 geraint
## Breaks compounds objects into individual components. Eliminates "incorrect object code error" in cbg.ps when component is not causally complete.
##
## Revision 1.8 2001/10/15 14:25:44 gawthrop
## Now handles white space at the end of component names
## Converts ports lables [1:5] into [1,2,3,4,5]
##
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# New path for awk script.
#
## Revision 1.1 1996/08/05 20:13:33 peter
## Initial revision
##
###############################################################
# Inform user
echo "Creating $1_rbg.m"
echo "Creating $1_cmp.m"
echo "Creating $1_head.fig"
echo "Creating $1_fig.fig"
echo "Creating $1_cmp.fig"
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# New path for awk script.
#
## Revision 1.1 1996/08/05 20:13:33 peter
## Initial revision
##
###############################################################
cmp2latex() {
gawk '{
## Zap trailing null
split($0,A,"\\");
## Find before and after:
N=split(A[1],B,":");
## Split into fields
M=split(B[1],C);
## Set special flag
FlagCol = 9
C[FlagCol] = 6;
## Write out modified version
for (i=1;i<M;i++)
printf("%s ",C[i]);
if (N==1)
printf("\\\\B{%s}\\001\n",C[M]);
if (N==2)
printf("\\\\BB{%s}{%s}\\001\n",C[M],B[2]);
}'
}
# Inform user
echo "Creating $1_rbg.m"
echo "Creating $1_cmp.m"
echo "Creating $1_head.fig"
echo "Creating $1_fig.fig"
echo "Creating $1_cmp.fig"
|
100
101
102
103
104
105
106
107
108
109
110
111
112
|
cat $1_lbl.txt $1_abg.mtt3 | gawk -f $MTTPATH/trans/awk/rbg_fig2m.awk $1
rm -f $1_abg.mtt
#Create the stripped abg file
cat $1_head.fig $1_bnd.fig $1_cmp.fig> $1_sabg.fig
|
>
>
>
>
|
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
cat $1_lbl.txt $1_abg.mtt3 | gawk -f $MTTPATH/trans/awk/rbg_fig2m.awk $1
rm -f $1_abg.mtt
#Create the stripped abg file
cat $1_head.fig $1_bnd.fig $1_cmp.fig> $1_sabg.fig
#Create the latexed abg file
cmp2latex<$1_cmp.fig >$1_lcmp.fig
cat $1_head.fig $1_bnd.fig $1_lcmp.fig > $1_labg.fig
strip_comments < $1_art.fig >> $1_labg.fig
|