Index: mttroot/mtt/bin/trans/sub_sh2tex ================================================================== --- mttroot/mtt/bin/trans/sub_sh2tex +++ mttroot/mtt/bin/trans/sub_sh2tex @@ -12,10 +12,15 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.3 2004/02/10 10:13:05 gawthrop +## Handles #SUMMARY correctely +## Refined count of subsystems within fig file (avoilds ports with same +## name as system +## ## Revision 1.2 2004/02/10 09:51:07 gawthrop ## Updated obsolete path name. ## ## Revision 1.1 2000/12/27 16:04:08 peterg ## Initial revision @@ -45,15 +50,15 @@ ############################################################### #Useful strings quote="'"; -listtype="itemize" +listtype="enumerate" -# Maximum list depth - maybe I should learn sh arithmetic!! -# Just go to two levels -maxlevel='0+1+1'; +# Maximum list depth +# Just go to 3 levels +maxlevel=3; #Look for a command line argument labels=''; arg=''; while [ -n "`echo $1 | grep '-'`" ]; do case $1 in @@ -69,15 +74,15 @@ system=$1 filename=$2 if [ -z "$3" ]; then - level=0; + let level=0; else - level=$4; + let level=$4; fi - +echo "level: $level" #Top-level commands if [ -z "$2" ]; then filename="$1_sub.tex" # Inform user @@ -122,11 +127,11 @@ if [ "$n_subsystems" != "0" ]; then cat <> $filename \begin{$listtype} EOF # Recursively generate the subsystems - level1="$level+1" + let level1="$level+1" sh $system\_sub.sh "sub_sh2tex $arg " " $filename $system $level1" cat <> $filename \end{$listtype} EOF #else