Index: mttroot/mtt/bin/trans/struc_txt2tex ================================================================== --- mttroot/mtt/bin/trans/struc_txt2tex +++ mttroot/mtt/bin/trans/struc_txt2tex @@ -4,19 +4,22 @@ ##### Model Transformation Tools ##### ###################################### # Bourne shell script: struc_txt2tex -# Stucture file - text to TeX table conversion +# Structure file - text to TeX table conversion # P.J.Gawthrop April 1997 # Copyright (c) P.J.Gawthrop, 1997. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +# Revision 1.2 1997/04/15 11:17:58 peterg +# Uses supertabular for long tables. +# # Revision 1.1 1997/04/15 09:49:04 peterg # Initial revision # ############################################################### @@ -30,25 +33,38 @@ 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 sed 's/_/\\_/g' < $1_struc.txt | gawk ' -function header(what){ -# print "\\begin{table}[htbp]"; - print " \\centering"; - print " \\bottomcaption{" what "}"; - print " \\begin{supertabular}{|l|l|l|l|}"; - print " \\hline"; - print " Index & Component & System & Repetition \\\\"; - print " \\hline"; -} - -function footer(what){ - print " \\hline"; - print " \\end{supertabular}"; -# print " \\caption{" what "}"; -# print "\\end{table}"; +#function header(what){ +# print " \\centering"; +# print " \\tablefirsthead{\\hline %"; +# print " \\multicolumn{4}{|c|}{\\bf List of " what "s for system " SYSTEM "} \\\\"; +# print " \\hline"; +# print " & Component & System & Repetition \\\\"; +# print " \\hline}"; +# +# print " \\tablehead{\\hline %"; +# print " \\multicolumn{4}{|c|}{\\bf List of " what "s for system " SYSTEM " (continued)} \\\\"; +# print " \\hline"; +# print " & Component & System & Repetition \\\\"; +# print " \\hline}"; +# +# print " \\tabletail{\\hline}"; +# print " \\begin{supertabular}{|l|l|l|l|}"; +#} +function header(what){ + print "\\begin{table}[htbp]"; + print " \\begin{tabular}{|l|l|l|l|}"; print " \\hline"; + print " & Component & System & Repetition \\\\"; + print " \\hline"; +} +function footer(what){ + print " \\hline"; + print " \\end{tabular}"; +# print " \\caption{" what "}"; + print "\\end{table}"; print " \\bigskip"; print " \\bigskip"; } BEGIN{ @@ -63,11 +79,11 @@ Which = $1; } END{ footer(Which) } -' >> $1_struc.tex 2>mtt_error.txt +' SYSTEM=$1 >> $1_struc.tex 2>mtt_error.txt # Now invoke the standard error handling. -#mtt_error mtt_error.txt +mtt_error mtt_error.txt