Overview
Comment:Initial revision
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 0f5da0b8c10c9e7d8ea4fec866649c24f3131586284ba258e983ded6259b32aa
User & Date: gawthrop@users.sourceforge.net on 1997-04-15 09:49:04
Other Links: branch diff | manifest | tags
Context
1997-04-15
11:17:58
Uses supertabular for long tables. check-in: cabb19c27f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:49:04
Initial revision check-in: 0f5da0b8c1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:18:26
Added structure file check-in: bc45f2ebf3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/trans/struc_txt2tex version [64e5014276].

























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: struc_txt2tex

# Stucture file - text to TeX table conversion
# P.J.Gawthrop April 1997
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################


# Inform user
echo "Creating $1_struc.tex"

rm -f mtt_error

#Write some file headers
echo "%% Structure file ($1_struc.txt)" > $1_struc.tex
echo "%% Generated by MTT at `date`" >> $1_struc.tex

# This is the main transformation using gawk
gawk '
function header(){
  print "\\begin{tabular}{l|l|l}";
}

function footer(what){
  print "\\caption{" what "}";
  print "\\end{tabular}"
}

BEGIN{
Which=""
}
{
  if ($1!=Which) {
    if (Which!="") footer(Which);
    header();
  }
  print $2, $3, $4;
  Which = $1;
}
END{
  footer(Which)
}
' < $1_struc.txt >> $1_struc.tex 2>mtt_error.txt

# Now invoke the standard error handling.
#mtt_error mtt_error.txt



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