Overview
Context
Changes
Added mttroot/mtt/bin/trans/lbl_txt2tex version [a153338114].
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#! /bin/sh
######################################
##### Model Transformation Tools #####
######################################
# Bourne shell script: lbl_txt2tex
# Latex summary of the lbl file
# Copyright (c) P.J.Gawthrop 1998
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################
# Inform user
echo Creating $1_lbl.tex
#Create the alias file complete with headers.
echo "% Label summary file ($1_lbl.tex)" > $1_lbl.tex
echo "% Generated by MTT at `date`" >> $1_lbl.tex
#Write out the Description
grep '[%|#]SUMMARY' $1_lbl.txt | sed 's/_/\\_/g' |\
awk '{
print "\\paragraph{System " $2 ":"
for (i=3;i<=NF;i++) print $i " ";
print "}"
}' >> $1_lbl.tex
grep '[%|#]DESCRIPTION' $1_lbl.txt | sed 's/_/\\_/g' |\
awk '{
for (i=2;i<=NF;i++) print $i " ";
}' >> $1_lbl.tex
#Write out the aliases
cat <<EOF >> $1_lbl.tex
\begin{description}
EOF
grep '[%|#]ALIAS' $1_lbl.txt | sed 's/_/\\_/g' |\
awk '{
if (match($2,"\\$")>0){
print "\\item [Parameter \\" $2 "] represents " $3
}
else{
print "\\item [Port " $2 "] represents actual port " $3 ""
}
}
END{if (NR==0) print "\\item This component has no aliases"
}' | sort >> $1_lbl.tex
cat <<EOF >> $1_lbl.tex
\end{description}
EOF
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added mttroot/mtt/lib/comp/compound/Electrical/Tee/Tee_lbl.txt version [126495e15d].
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
%SUMMARY Tee Electrical T circuit
%DESCRIPTION A two port circuit composed of 2 resistors and one
%DESCRIPTION capacitor in a T form,
%% Label file for system Tee (Tee_lbl.txt)
%ALIAS $1 r_1
%ALIAS $2 r_2
%ALIAS $3 c
%ALIAS in 1
%ALIAS out 2
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Each line should be of one of the following forms:
% a comment (ie starting with %)
% Component-name CR_name arg1,arg2,..argn
% blank
% Component type C
c lin effort,c
% Component type R
r_1 lin flow,r_1
r_2 lin flow,r_2
% Component type SS
[1] SS external,external
[2] SS external,external
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |