Overview
Comment:Now handles multiple options whis .tex files as well
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: eae0c949b801660c0fc1aa4861f352e5c492c23a69fb28db46508cfa1101303a
User & Date: gawthrop@users.sourceforge.net on 2002-05-09 16:07:54
Other Links: branch diff | manifest | tags
Context
2002-05-10
09:08:55
Added EMTF and INTF
Fixed bug in writing out component headings
check-in: 0cb15cb36f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-05-09
16:07:54
Now handles multiple options whis .tex files as well check-in: eae0c949b8 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
15:52:09
Now uses current cr file is its newer than abg.m check-in: e9251d571b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/rep_txt2tex from [d083375b70] to [cc214b0710].

10
11
12
13
14
15
16



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







+
+
+







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  2002/05/01 14:07:05  gawthrop
## Added -dr foo (reads files from foo) dir.
##
## Revision 1.2  2002/04/28 18:55:03  geraint
## Fixed [ 549658 ] awk should be gawk.
## Replaced calls to awk with call to gawk.
##
## Revision 1.1  2000/12/27 15:57:31  peterg
## Initial revision
##
192
193
194
195
196
197
198

199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234

235
236
237
238
239
240
241
242
243
244







+

















-
+














-










print "%%" __Args "%%"
#  print "DEBUG", Language, args, _Args, __Args
  RepLang = sprintf("%s%s.%s", Representation, __Args, Language);
  SysRepLang = sprintf("%s_%s", System, RepLang);
  SysRepLangArgs = sprintf("%s_%s", System, RepLang, __Args);
  SysRep = sprintf("%s_%s%s", System, Representation, __Args);
  filename = gensub(/,/, "-", "g", SysRep);
  FileName = sprintf("%s/%s", PWD, filename);
  section_head = sprintf("\\textbf{%s\\_%s.%s} \\emph{%s}",
   System,Representation,Language, header_args);
   
# section headings
    if (match(Languages,Language)>0) {
    print "\n\n\\section{" section_head "}";
    print "\\label{sec:" SysRepLangArgs "}";
    print "\\index{\\textbf{" System "} -- " Representation "}";
    
    print "\n\nMTT command:";
    print "\\begin{verbatim}";
      for (i=1;i<=NF;i++) printf("%s ", $i);
    print "\n\\end{verbatim}";
    }

# tex files
    if( match("tex",Language)>0) {
      printf("  \\input{%s/%s_%s.%s}\n", PWD, System, Representation, Language);
      printf("  \\input{%s}\n", FileName);
#      command = sprintf("sed s!fig{!fig{%s! < %s_%s.%s", Directory, System, Representation, Language);
#      system(command);    
}

# text files
    if( match("txt r m c h icad",Language)>0) {
      print "  \\begin{verbatim}";
      command = sprintf("cat %s.txt", filename);
      system(command);
      print "  \\end{verbatim}";  
    }
# ps files
    if( match("ps",Language)>0) {
      printf("This representation is given as Figure \\Ref{fig:%s}.\n", SysRepLangArgs);
      FileName = sprintf("%s/%s", PWD, filename);
      Label = sprintf("%s", SysRepLangArgs);
      Caption = sprintf("System \\textbf{%s}, representation %s (%s)", System, Representation, __Args);
      printf("\\fig{%s}\n    {%s}\n    {0.9}\n    {%s}\n",FileName,Label,Caption);
  }
}
END {

}' mtt_switches="${mtt_switches}" system=$1 Directory=$directory PWD=`pwd` > $1_rep.tex

fi


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