Index: mttroot/mtt/bin/trans/rbg_fig2m ================================================================== --- mttroot/mtt/bin/trans/rbg_fig2m +++ mttroot/mtt/bin/trans/rbg_fig2m @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.13 2005/03/15 15:03:55 gawthrop +## Now works for Hierarchical systems +## ## Revision 1.12 2005/03/15 12:49:28 gawthrop ## Handle descriptive (inc maths) text as well ## ## Revision 1.11 2005/03/15 12:03:48 gawthrop ## New labg.fig rep - pretty LaTeX figures. @@ -55,23 +58,27 @@ ## ############################################################### cmp2latex() { gawk '{ - ## Zap trailing null - split($0,A,"\\"); + ## + ## Zap trailing \001 + A = substr($0,1,length($0)-4); ## Find before and after: - N=split(A[1],B,":"); + N=split(A,B,":"); ## Split into fields M=split(B[1],C); - ## Dont modify port labels + ## Dont modify port labels (except for _ -> \_) if(index(C[M],"[")==1){ - for (i=1;i$1_lart.fig cmp2latex<$1_cmp.fig >$1_lcmp.fig -cat $1_head.fig $1_bnd.fig $1_lcmp.fig > $1_labg.fig -strip_comments < $1_lart.fig >> $1_labg.fig +cat $1_head.fig $1_bnd.fig $1_lcmp.fig | sed 's/---- / /' > $1_labg.fig +strip_comments < $1_lart.fig | sed 's/---- / /' >> $1_labg.fig