Overview
Comment:Now works for Hierarchical systems
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 6e579f87f6e5ff660b584c6a9844d9c85423140e4bc7777110dc11085fa8eda6
User & Date: gawthrop@users.sourceforge.net on 2005-03-15 15:03:55.000
Other Links: branch diff | manifest | tags
Context
2005-03-21
10:34:47
Tidied. check-in: 71ba696ebc user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2005-03-15
15:03:55
Now works for Hierarchical systems check-in: 6e579f87f6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:36:31
Pretty abg figure in reports. check-in: 4e19f6168e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
13
14
15
16
17
18
19



20
21
22
23
24
25
26
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+
+
+







# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.410  2005/03/15 13:35:50  gawthrop
## Pretty abg figure in reports.
##
## Revision 1.409  2005/03/15 12:03:17  gawthrop
## New labg.fig rep - pretty LaTeX figures.
##
## Revision 1.408  2005/02/18 16:59:02  gawthrop
## Don't check files when using -s
##
## Revision 1.407  2005/02/17 18:36:38  geraint
2980
2981
2982
2983
2984
2985
2986

2987
2988
2989
2990
2991
2992
2993
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997







+







$1_sabg.fig: $1_rbg.m

#SUMMARY labg	latex-ready acausal bond graph (fig)
$1_labg.fig: $1_rbg.m
$1_labg.tex: $1_labg.fig
	fig2dev -L pstex_t -p $1_labg.eps $1_labg.fig $1_labg.tex
	fig2dev -L pstex $1_labg.fig $1_labg.eps
	cp -v $1_labg.eps ..

#Subsystem creation commands
#SUMMARY sub Executable subsystem list (sh)
ifeq ($start_at_abg,yes)
$1_sub.sh: $1_abg.m
	abg2sub_m2sh $1
else
3960
3961
3962
3963
3964
3965
3966

3967
3968
3969
3970
3971
3972
3973
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978







+







	rep_txt2sh $1 "$mtt_switches";  touch $1_reps_made

$1_rep.tex: $1_rep.txt $1_reps_made
	rep_txt2tex $1 "$documenttype" "$directory" "$mtt_switches";

#SUMMARY abg Acausal bond graph report (tex)
$1_abg.tex: $1_sub.sh $1_labg.tex
	sh $1_sub.sh "mtt -q " " labg tex"
	abg2tex $pdf ${sensitivity_switch} $1

#SUMMARY tf Transfer function (mml)
$1_$2.mml: $1_$2.r
	mtt_r2mml $1 $2


11
12
13
14
15
16
17



18
19
20
21
22
23
24
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27







+
+
+







# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## 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.
##
## Revision 1.10  2002/04/28 18:55:03  geraint
## Fixed [ 549658 ] awk should be gawk.
## Replaced calls to awk with call to gawk.
##
59
60
61
62
63
64
65







66
67
68



69
70
71
72
73
74
75
76












77
78
79
80
81
82
83
62
63
64
65
66
67
68
69
70
71
72
73
74
75



76
77
78
79







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98







+
+
+
+
+
+
+
-
-
-
+
+
+

-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+








  ## Find before and after:
  N=split(A[1],B,":");

  ## Split into fields
  M=split(B[1],C);

  ## Dont modify port labels
  if(index(C[M],"[")==1){
       for (i=1;i<M;i++)
         printf("%s ",C[i]);
       printf("%s\\001\n",C[M]);
   }
  else{
  ## Set special flag
  FlagCol = 9
  C[FlagCol] = 6;
     ## 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]);
     ## 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)
      if(index(B[2],"[")==1)
        printf("\\\\B{%s}:%s\\001\n",C[M],B[2]);
      else
        printf("\\\\BB{%s}{%s}\\001\n",C[M],B[2]);
   }
  }'  
}

art2latex() {
  gawk '{
  ## Is it text?
  is_text="4";

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]