Differences From Artifact [6a70c23123]:

To Artifact [e1fee78c40]:


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.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.
##







>
>
>







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

  ## 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]);

  }'  
}

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







>
>
>
>
>
>
>
|
|
|

|
|
|
>
|
|
|
>
>
>
|
>







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;

     ## 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 ]