set dirs = ("rtl syn oldsyn mix oldmix verilog" "rtl ref syn mix" \
	"rtl ref syn oldsyn mix oldmix verilog" ".")

foreach design ( clock mult opw tlcWalk )
  rm -f tex/$design					>& /dev/null
  foreach dir ($dirs[1])
    echo "% $dir"					>> tex/$design
    cat  plot/tex.head					>> tex/$design
    set grpTxt = ("VSS" "Scirocco" "Cyclone" "Leapfrog" "VCS" "Verilog" \
	"NCSim" "ModelSim" "Simili")
    foreach grp ("vss" "sci" "cyc" "sv" "vcs" "verilog" "ncsim" "vsim" "simili")
      ls ${design}/plot/${dir}/${grp}*tab*		>& /dev/null
      if (! $status) then
	foreach fi ( ${design}/plot/${dir}/${grp}*tab* )
	  echo "%-----------------------------------------------------------------------------"\					>> tex/$design
	  echo $grpTxt[1]				>> tex/$design
	  sed -f plot/tex.sed $fi | sed -e "s/1234/$grp/"	>> tex/$design
	  echo "%-----------------------------------------------------------------------------"\					>> tex/$design
	end
      endif
      shift grpTxt
    end
    echo "\end{tabular}"				>> tex/$design
  end
  shift dirs
end
unset grpTxt
unset dirs
