ADDED mttroot/mtt/bin/trans/lbl_txt2tex Index: mttroot/mtt/bin/trans/lbl_txt2tex ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/lbl_txt2tex @@ -0,0 +1,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 <> $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 <> $1_lbl.tex +\end{description} +EOF + + + + + + + + + + ADDED mttroot/mtt/lib/comp/compound/Electrical/Tee/Tee_lbl.txt Index: mttroot/mtt/lib/comp/compound/Electrical/Tee/Tee_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/comp/compound/Electrical/Tee/Tee_lbl.txt @@ -0,0 +1,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